mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
Merge pull request #2481 from felds/master
highlight the username when root
This commit is contained in:
commit
ae9a9b7f70
1 changed files with 13 additions and 0 deletions
|
@ -32,3 +32,16 @@ PROMPT="
|
|||
${git_info} \
|
||||
%{$fg[white]%}[%*]
|
||||
%{$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
|
||||
|
|
Loading…
Reference in a new issue