eastwood.zsh-theme
896 bytes
1# RVM settings
2if [[ -s ~/.rvm/scripts/rvm ]] ; then
3 RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
4else
5 if which rbenv &> /dev/null; then
6 RPS1="%{$fg[yellow]%}rbenv:%{$reset_color%}%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1"
7 fi
8fi
9
10ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
11ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
12ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
13ZSH_THEME_GIT_PROMPT_CLEAN=""
14
15# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
16git_custom_status() {
17 local cb=$(git_current_branch)
18 if [ -n "$cb" ]; then
19 cb="${cb//\%/%%}"
20 echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX${cb}$ZSH_THEME_GIT_PROMPT_SUFFIX"
21 fi
22}
23
24PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '