mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
Set colour for user@hostname to red if we're root (or sudo) in the bira theme.
This commit is contained in:
parent
686e460258
commit
a67dfae72b
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
|||
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}'
|
||||
else
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
fi
|
||||
|
||||
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
|
||||
local rvm_ruby=''
|
||||
if which rvm-prompt &> /dev/null; then
|
||||
|
|
Loading…
Reference in a new issue