Not for normies
| 1 | # Based on robbyrussell's theme, with host and rvm indicators. Example: |
| 2 | # @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname) |
| 3 | |
| 4 | # Get the current ruby version in use with RVM: |
| 5 | if [ -e ~/.rvm/bin/rvm-prompt ]; then |
| 6 | RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " |
| 7 | else |
| 8 | if which rbenv &> /dev/null; then |
| 9 | RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " |
| 10 | fi |
| 11 | fi |
| 12 | |
| 13 | # Get the host name (first 4 chars) |
| 14 | HOST_PROMPT_="%{$fg_bold[red]%}@%m ➜ %{$fg_bold[cyan]%}%c " |
| 15 | GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" |
| 16 | PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT" |
| 17 | |
| 18 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" |
| 19 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
| 20 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" |
| 21 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |