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