summaryrefslogtreecommitdiff
path: root/themes/crunch.zsh-theme
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-05-08 08:50:31 +0200
committerMarc Cornellà <marc.cornella@live.com>2019-05-08 08:50:31 +0200
commit76c7bd57c332b3d9231dc2c6167f3c5d3e56e110 (patch)
treeacdc36193f390e01f4144ff8feefd126b5aecd8b /themes/crunch.zsh-theme
parentea3e666e04bfae31b37ef42dfe54801484341e46 (diff)
parent299cd4777a8b9da1934a1ed0c80767eea6691a70 (diff)
downloadzsh-76c7bd57c332b3d9231dc2c6167f3c5d3e56e110.tar.gz
zsh-76c7bd57c332b3d9231dc2c6167f3c5d3e56e110.tar.bz2
zsh-76c7bd57c332b3d9231dc2c6167f3c5d3e56e110.zip
Merge branch 'apjanke/themes-rvm-prompt-function' (#4588)
Fixes #4272 Fixes #4182 Closes #4197 Closes #4588
Diffstat (limited to 'themes/crunch.zsh-theme')
-rw-r--r--themes/crunch.zsh-theme10
1 files changed, 3 insertions, 7 deletions
diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
index 2fc066381..8278661ab 100644
--- a/themes/crunch.zsh-theme
+++ b/themes/crunch.zsh-theme
@@ -29,13 +29,9 @@ 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%}"
-if [ -e ~/.rvm/bin/rvm-prompt ]; 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
+ZSH_THEME_RUBY_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
+CRUNCH_RVM_='$(ruby_prompt_info)'
CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "