1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-25 05:41:58 +00:00

highlight the username when root

This commit is contained in:
Felds Liscia 2014-01-30 15:04:09 -02:00
parent df0305aba5
commit 4d83da770a

View file

@ -32,3 +32,16 @@ PROMPT="
${git_info} \ ${git_info} \
%{$fg[white]%}[%*] %{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
if [[ "$(whoami)" == "root" ]]; then
PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
%{$fg[white]%}at \
%{$fg[green]%}$(box_name) \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
${git_info} \
%{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
fi