diff options
author | Robby Russell <robby@planetargon.com> | 2012-01-25 18:14:29 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2012-01-25 18:14:29 -0800 |
commit | b56e37201dd6cf00a667daa1f033cfb1b1669b4a (patch) | |
tree | 0be7579715d81186b2ba2c8361ff620eb544d878 /themes/crunch.zsh-theme | |
parent | 9dc9cae55f5aa9ab12db71da64ab062906d8504b (diff) | |
parent | 6496acf58bf8531809490b52e34811f74a27cc7c (diff) | |
download | zsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.tar.gz zsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.tar.bz2 zsh-b56e37201dd6cf00a667daa1f033cfb1b1669b4a.zip |
Merge pull request #860 from sbfaulkner/rbenv-support-for-themes
adding rbenv support to all the rvm themes
Diffstat (limited to 'themes/crunch.zsh-theme')
-rw-r--r-- | themes/crunch.zsh-theme | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme index 2473cd230..b2759a1b0 100644 --- a/themes/crunch.zsh-theme +++ b/themes/crunch.zsh-theme @@ -29,7 +29,13 @@ ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗" # Our elements: CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}" -CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}" +if which rvm-prompt &> /dev/null; then + CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}" +else + if which rbenv &> /dev/null; then + CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(rbenv version | sed -e 's/ (set.*$//' -e 's/^ruby-//')}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}" + fi +fi CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) " CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ " |