From d2be10e7e4fabec8711a60c2ab85387a4e00dd5b Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Wed, 5 May 2010 04:58:10 +0800 Subject: [PATCH] happy with my theme. caret turns red for root --- themes/afowler.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/afowler.zsh-theme b/themes/afowler.zsh-theme index f82e7bc..b5a9bb1 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}"