fixed rvm warning

This commit is contained in:
Menno Pruijssers 2013-09-09 10:51:07 +02:00 committed by ncanceill
parent 99c9dbed47
commit aee8877988

View file

@ -32,11 +32,12 @@ function check_git_prompt_info() {
# Determine if we are using a gemset. # Determine if we are using a gemset.
function rvm_gemset() { function rvm_gemset() {
GEMSET=`rvm gemset list | grep '=>' | cut -b4-` if hash rvm 2>/dev/null; then
if [[ -n $GEMSET ]]; then GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" if [[ -n $GEMSET ]]; then
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
fi
fi fi
} }
# Determine the time since last commit. If branch is clean, # Determine the time since last commit. If branch is clean,