From 8d2b9d10e5105f9e0af0700e427e0567011ab45b Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Sat, 8 Jan 2011 18:15:57 -0800 Subject: avoid forking subshell to test if user is root --- themes/dst.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/dst.zsh-theme') diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme index fa0d9cb06..3e2539d57 100644 --- a/themes/dst.zsh-theme +++ b/themes/dst.zsh-theme @@ -5,7 +5,7 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" ZSH_THEME_GIT_PROMPT_CLEAN="" function prompt_char { - if [ "$(whoami)" = "root" ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi + if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi } PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%} -- cgit v1.2.3-70-g09d2