mira.zsh-theme 979 B

1234567891011121314151617181920212223242526272829
  1. # Based on bira zsh theme with nvm, rvm and jenv support
  2. local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
  3. local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
  4. local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
  5. local rvm_ruby=''
  6. if which rvm-prompt &> /dev/null; then
  7. rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
  8. else
  9. if which rbenv &> /dev/null; then
  10. rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
  11. fi
  12. fi
  13. local nvm_node=''
  14. nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
  15. local jenv_java=''
  16. jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
  17. local git_branch='$(git_prompt_info)%{$reset_color%}'
  18. PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
  19. ╰─%B$%b "
  20. RPS1="${return_code}"
  21. ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
  22. ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"