Make sure that RVM is loaded before defining extras

pull/52/head
Travis Swicegood 2011-05-30 09:52:30 -05:00
parent 20d5f97f3e
commit b740d7f0f7
1 changed files with 20 additions and 17 deletions

View File

@ -3,24 +3,27 @@
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# Load the auto-completion script if RVM was loaded.
# Check to make sure that RVM is actually loaded before adding
# the customizations to it.
if [ "$rvm_path" ]
then
# Load the auto-completion script if RVM was loaded.
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
switch () {
rvm $1
local v=$(rvm_version)
rvm wrapper $1 textmate
echo "Switch to Ruby version: "$v
}
rvm_default () {
rvm --default $1
rvm wrapper $1 textmate
}
function rvm_version () {
ruby --version
}
fi
switch () {
rvm $1
local v=$(rvm_version)
rvm wrapper $1 textmate
echo "Switch to Ruby version: "$v
}
rvm_default () {
rvm --default $1
rvm wrapper $1 textmate
}
function rvm_version () {
ruby --version
}