ae9a9b7f703ee6a773dccb9857d7939ef99fccd9
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #2481 from felds/master
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