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/clean.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/clean.zsh-theme') diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 95f532a82..7ee29cb8c 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="white"; fi +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' RPROMPT='[%*]' -- cgit v1.2.3-70-g09d2