From 4a876ac7e29c2314d140835941d8c897958988cc Mon Sep 17 00:00:00 2001 From: Vanildo Souto Mangueira Date: Thu, 30 Aug 2018 14:49:25 -0300 Subject: [PATCH] Changed text color to red when 'root' --- themes/juanghurtado.zsh-theme | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/themes/juanghurtado.zsh-theme b/themes/juanghurtado.zsh-theme index dbdfde7b8..95a400e61 100644 --- a/themes/juanghurtado.zsh-theme +++ b/themes/juanghurtado.zsh-theme @@ -34,8 +34,11 @@ ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}" ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]" +USER_COLOR=$GREEN_BOLD +[[ $UID -eq 0 ]] && USER_COLOR=$RED_BOLD + # Prompt format PROMPT=' -%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%} +%{$USER_COLOR%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%} %{$BLUE%}>%{$RESET_COLOR%} ' RPROMPT='%{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'