updated theme that does not check for dirty git working dirs

This commit is contained in:
Peter Hoeg 2011-09-29 17:12:35 +08:00
commit ea7194635b

View file

@ -3,15 +3,16 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() { git_custom_status() {
local cb=$(current_branch) local cb=$(current_branch)
if [ -n "$cb" ]; then if [ -n "$cb" ]; then
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" echo "%{$fg[green]%}[$(current_branch)]%{$reset_color%}"
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
# echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi fi
} }
#rbenv and git settings #git and rbenv
RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv_prompt_info`]%{$reset_color%} $EPS1' RPS1='$(git_custom_status)[`rbenv_prompt_info`]`battery_pct_prompt` $EPS1'
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '