28ac0e95daa52e8d784b0560af72c58515e7f7de
- Author
- Vanildo Souto Mangueira <vanildo.souto@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(juanghurtado): Changed text color to red when 'root' (#7104)
Diff
1diff --git a/themes/juanghurtado.zsh-theme b/themes/juanghurtado.zsh-theme
2index dbdfde7b889fb605e972dc0b147b5e5157416082..95a400e61aec8fb7379af9de746f5b32d7a4e1a9 100644
3--- a/themes/juanghurtado.zsh-theme
4+++ b/themes/juanghurtado.zsh-theme
5@@ -34,8 +34,11 @@ ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)"
6 ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
7 ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
8
9+USER_COLOR=$GREEN_BOLD
10+[[ $UID -eq 0 ]] && USER_COLOR=$RED_BOLD
11+
12 # Prompt format
13 PROMPT='
14-%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
15+%{$USER_COLOR%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
16 %{$BLUE%}>%{$RESET_COLOR%} '
17 RPROMPT='%{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'