eastwood.zsh-theme 890 B

1234567891011121314151617181920212223
  1. # RVM settings
  2. if [[ -s ~/.rvm/scripts/rvm ]] ; then
  3. RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
  4. else
  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
  8. fi
  9. ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
  10. ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
  11. ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
  12. ZSH_THEME_GIT_PROMPT_CLEAN=""
  13. # Customized git status, oh-my-zsh currently does not allow render dirty status before branch
  14. git_custom_status() {
  15. local cb=$(git_current_branch)
  16. if [ -n "$cb" ]; then
  17. echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
  18. fi
  19. }
  20. PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '