Skip to content
Snippets Groups Projects
Commit 7b4d295b authored by Ayaz Badouraly's avatar Ayaz Badouraly
Browse files

Setting color output according to $?

parent c45eb237
No related branches found
No related tags found
No related merge requests found
......@@ -8,11 +8,11 @@ if [[ $UID -ne 0 ]];
then
# normal user
local user="%{$fg_bold[red]%}%n%{$reset_color%}"
local eol="%{$fg_bold[yellow]%}%%%{$reset_color%}"
local eol="%{%(?.$fg_bold[yellow].$fg_bold[red])%}%%%{$reset_color%}"
else
# root
local user="%{$fg_bold[blue]%}%n%{$reset_color%}"
local eol="%{$fg_bold[yellow]%}#%{$reset_color%}"
local eol="%{%(?.$fg_bold[yellow].$fg_bold[red])%}#%{$reset_color%}"
fi
local user_host="${user}%{$fg_bold[yellow]%}@%{$fg_bold[white]%}%m%{$reset_color%}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment