d926a55872b5a12ab8b987e9d86c02358d0c825e

Author
Stephen Eley <sfeley@gmail.com>
Committer
Stephen Eley <sfeley@gmail.com>
Date

Message

Refined RVM prompt in Crunch theme

Diff

 1diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
 2index 7dd5816ee9b69ff1773a1560b3cb8e4720185711..2473cd230e9f95e303bd0f5ff4c4434b020e4bfe 100644
 3--- a/themes/crunch.zsh-theme
 4+++ b/themes/crunch.zsh-theme
 5@@ -6,7 +6,7 @@
 6 # things that vary in my own workflow are shown:
 7 #
 8 # * The time (not the date)
 9-# * The RVM version (omitting the interpreter name if it's just 'ruby')
10+# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
11 # * The current directory
12 # * The Git branch and its 'dirty' state
13 # 
14@@ -29,7 +29,7 @@ ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
15 
16 # Our elements:
17 CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
18-CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\$(~/.rvm/bin/rvm-prompt v g)$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
19+CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
20 CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
21 CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
22