From 67124100873618ec93d9d57fd06b48e7b2ab065d Mon Sep 17 00:00:00 2001 From: Michael Contento Date: Tue, 25 Oct 2011 17:32:42 +0200 Subject: [PATCH] Small comment added to the miloshadzic theme --- themes/miloshadzic.zsh-theme | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/themes/miloshadzic.zsh-theme b/themes/miloshadzic.zsh-theme index 54e12db84..5f372b4b0 100644 --- a/themes/miloshadzic.zsh-theme +++ b/themes/miloshadzic.zsh-theme @@ -1,11 +1,27 @@ +# Yay! High voltage, arrows and kings! +# +# Some features in this theme are flagable: +# +# ZSH_THEME_PREFIX_ROOT=1 +# >> Prefix the prompt with a red crown if the +# current user is root +# +# ZSH_THEME_USE_RPROMPT=1 +# >> Display the last return code in red in the +# right prompt. But only if the code was not zero. +# + +# Configuration for $(git_prompt_info) ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="" +# Some variables to make things readable local directory="%{$fg[cyan]%}%1~%{$reset_color%}" local left_delimiter="%{$fg[red]%}|%{$reset_color%}" local right_delimiter=" %{$fg[cyan]%}⇒%{$reset_color%} " + if [[ "$ZSH_THEME_PREFIX_ROOT" != "" && "$UID" -eq 0 ]]; then local root_prefix="%{$fg[red]%}♚ %{$reset_color%}" else @@ -14,6 +30,7 @@ fi PROMPT='${root_prefix}${directory}${left_delimiter}$(git_prompt_info)${right_delimiter}' +# And finally the RPROMPT if activated if [ "$ZSH_THEME_USE_RPROMPT" != "" ]; then local return_code="%(?..%{$fg[red]%}%?%{$reset_color%})" RPROMPT='${return_code}'