From 74177c5320b2a1b2f8c4c695c05984b57fd7c6ea Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 9 Oct 2014 13:44:54 +0200 Subject: Change all whoami calls for $USER variable This avoid spawning additional processes, as the $USER variable will **always** contain the current logged-in user. --- lib/completion.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/completion.zsh b/lib/completion.zsh index 83b6efb66..3a19a4eba 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -27,9 +27,9 @@ zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' if [ "$OSTYPE[0,7]" = "solaris" ] then - zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm" + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm" else - zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" fi # disable named-directories autocompletion -- cgit v1.2.3-70-g09d2