summaryrefslogtreecommitdiff
path: root/themes/dst.zsh-theme
diff options
context:
space:
mode:
authorSuraj N. Kurapati <sunaku@gmail.com>2011-01-08 18:15:57 -0800
committerSuraj N. Kurapati <sunaku@gmail.com>2011-01-08 18:15:57 -0800
commit8d2b9d10e5105f9e0af0700e427e0567011ab45b (patch)
tree0aef7833f9aa62d38fd4b5ddd010c8d0e09b6ff0 /themes/dst.zsh-theme
parent7a9cc198196cb0c935afe96e1de249c3a05ad413 (diff)
downloadzsh-8d2b9d10e5105f9e0af0700e427e0567011ab45b.tar.gz
zsh-8d2b9d10e5105f9e0af0700e427e0567011ab45b.tar.bz2
zsh-8d2b9d10e5105f9e0af0700e427e0567011ab45b.zip
avoid forking subshell to test if user is root
Diffstat (limited to 'themes/dst.zsh-theme')
-rw-r--r--themes/dst.zsh-theme2
1 files changed, 1 insertions, 1 deletions
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%}