diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme index b5a9bb1730da..3a4753fc105f 100644 --- a/themes/afowler.zsh-theme +++ b/themes/afowler.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi +if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index a23efd1d763e..d62dcdcb9d7f 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="yellow"; fi +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 95f532a823f5..7ee29cb8ccea 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='[%*]' diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme index fa0d9cb06bf6..3e2539d57592 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%} diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 534664f115e4..0fa6b4ecd5e8 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -1,6 +1,6 @@ # ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png -if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme index fa7c590355a2..e7ea51a2ff82 100644 --- a/themes/philips.zsh-theme +++ b/themes/philips.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' RPROMPT='[%*]' diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme index 4eb54df5baaf..e4e45c71adfa 100644 --- a/themes/pmcgee.zsh-theme +++ b/themes/pmcgee.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi PROMPT=' %{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}