Shows RVM info only when a gemset that is not the default one

This commit is contained in:
Caio Gondim
2014-07-09 21:53:13 +02:00
parent 7bb34de0fb
commit c5c7dc082d

View File

@@ -123,9 +123,13 @@ prompt_dir() {
prompt_segment blue white '%1~' prompt_segment blue white '%1~'
} }
# RVM: only shows RVM info if on a gemset that is not the default one
prompt_rvm() { prompt_rvm() {
if which rvm-prompt &> /dev/null; then if which rvm-prompt &> /dev/null; then
prompt_segment magenta white "♦️ `rvm-prompt i v g`" if [[ ! -n `rvm gemset list | grep "=> (default)"` ]]
then
prompt_segment magenta white "♦️ `rvm-prompt i v g`"
fi
fi fi
} }