4d83da770a85f4d2e6b0e0990cb83c925de128bd

Author
Felds Liscia <felds@carbon6.cc>
Committer
Felds Liscia <felds@carbon6.cc>
Date

Message

highlight the username when root

Diff

 1diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
 2index 43c101c2a854dcb2e3058d60a4e22da40b2bd139..a44f295f4acd229833e20051c4c84a600d1dbb71 100644
 3--- a/themes/ys.zsh-theme
 4+++ b/themes/ys.zsh-theme
 5@@ -32,3 +32,16 @@ PROMPT="
 6 ${git_info} \
 7 %{$fg[white]%}[%*]
 8 %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
 9+
10+if [[ "$(whoami)" == "root" ]]; then
11+PROMPT="
12+%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
13+%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
14+%{$fg[white]%}at \
15+%{$fg[green]%}$(box_name) \
16+%{$fg[white]%}in \
17+%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
18+${git_info} \
19+%{$fg[white]%}[%*]
20+%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
21+fi