diff options
author | Andy Fowler <andy@andyfowler.com> | 2010-05-05 04:58:10 +0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2010-05-08 04:29:21 +0800 |
commit | a649b2d410e3f3cd2b5749d199da03168d0c3920 (patch) | |
tree | 2572ce2b1463cad9bfeb134e3cd62070aacea053 /themes/afowler.zsh-theme | |
parent | 6213f3304f945b56dfea30d6e11e4c860afdbbc9 (diff) | |
download | zsh-a649b2d410e3f3cd2b5749d199da03168d0c3920.tar.gz zsh-a649b2d410e3f3cd2b5749d199da03168d0c3920.tar.bz2 zsh-a649b2d410e3f3cd2b5749d199da03168d0c3920.zip |
happy with my theme. caret turns red for root
Diffstat (limited to 'themes/afowler.zsh-theme')
-rw-r--r-- | themes/afowler.zsh-theme | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme index f82e7bc25..b5a9bb173 100644 --- a/themes/afowler.zsh-theme +++ b/themes/afowler.zsh-theme @@ -1,6 +1,8 @@ +if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi + local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" -PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg[blue]}%}»%{${reset_color}%} ' +PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' RPS1="${return_code}" |