ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="" git_custom_status() { local cb=$(current_branch) if [ -n "$cb" ]; then 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 } #git and rbenv RPS1='$(git_custom_status)[`rbenv_prompt_info`]`battery_pct_prompt` $EPS1' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '