diff options
author | Robby Russell <robby@planetargon.com> | 2012-12-02 12:10:32 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2012-12-02 12:10:32 -0800 |
commit | 423d66da5b7d093ad921627e7ae0bb6bc01e7626 (patch) | |
tree | c27a9f7d21dd9333edc24ce4598b33aa940b26ba | |
parent | c64c30ce9379573e672593bab2646703ede0727c (diff) | |
parent | f0451195f63b3607461bda1570c5fb2a4e429b3e (diff) | |
download | zsh-423d66da5b7d093ad921627e7ae0bb6bc01e7626.tar.gz zsh-423d66da5b7d093ad921627e7ae0bb6bc01e7626.tar.bz2 zsh-423d66da5b7d093ad921627e7ae0bb6bc01e7626.zip |
Merge pull request #409 from Bregor/patch-1
Dollar sign instead of percent in unprivileged user prompt (as in real ge
-rw-r--r-- | themes/gentoo.zsh-theme | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme index cba143d42..ee205d248 100644 --- a/themes/gentoo.zsh-theme +++ b/themes/gentoo.zsh-theme @@ -1,4 +1,8 @@ -PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%#%{$reset_color%} ' +function prompt_char { + if [ $UID -eq 0 ]; then echo "#"; else echo $; fi +} + +PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} ' ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_SUFFIX=") " |