Merge pull request #52 from tswicegood/rvm-enhancements

Optimize how RVM is loaded and add RVM auto completion.
pull/51/merge
Travis Swicegood 2011-06-03 23:45:26 -07:00
commit 13d7c76087
1 changed files with 26 additions and 13 deletions

View File

@ -1,4 +1,15 @@
#!/bin/bash #!/bin/bash
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# 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 () { switch () {
rvm $1 rvm $1
local v=$(rvm_version) local v=$(rvm_version)
@ -14,3 +25,5 @@ rvm_default () {
function rvm_version () { function rvm_version () {
ruby --version ruby --version
} }
fi