f0451195f63b3607461bda1570c5fb2a4e429b3e
- Author
- Maxim Filatov <pipopolam@gmail.com>
- Committer
- Maxim Filatov <pipopolam@gmail.com>
- Date
Message
Dollar sign instead of percent in unprivileged user prompt (as in real gentoo)
Diff
1diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme
2index cba143d426d0dadd49d1d8a9be2e966501f5c580..ee205d248c2aa1888062dd402c2e558612e2fc1f 100644
3--- a/themes/gentoo.zsh-theme
4+++ b/themes/gentoo.zsh-theme
5@@ -1,4 +1,8 @@
6-PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%#%{$reset_color%} '
7+function prompt_char {
8+ if [ $UID -eq 0 ]; then echo "#"; else echo $; fi
9+}
10+
11+PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '
12
13 ZSH_THEME_GIT_PROMPT_PREFIX="("
14 ZSH_THEME_GIT_PROMPT_SUFFIX=") "