From 6f0bf08f618e20ed23e3032c3731a29798c84a8e Mon Sep 17 00:00:00 2001 From: Poil Date: Mon, 13 Aug 2012 22:43:13 +0200 Subject: [PATCH] faster TTY grab --- liquidprompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidprompt b/liquidprompt index 7f2d4bb..b52e1ff 100755 --- a/liquidprompt +++ b/liquidprompt @@ -273,7 +273,7 @@ __user() __connection() { - THIS_TTY=tty$(ps aux | awk -v pid=$$ '$0 ~ pid && /bash/{ print $7 }') + THIS_TTY=$(awk -v pid=$$ '$0 ~ pid && /bash/{ print $7 }' < <(ps aux) ) SESS_SRC=$(who | awk -v thistty="$THIS_TTY" '$0 ~ thistty { print $6 }') # Are we in an SSH connexion?