diff --git a/shell/ruby.sh b/shell/ruby.sh index 529115c..c14a5f4 100755 --- a/shell/ruby.sh +++ b/shell/ruby.sh @@ -47,10 +47,16 @@ if [ -n "$BASH_VERSION" ]; then alias bcn="bundle clean" fi -if [ -n "$(command -v rbenv)" ]; then - eval "$(rbenv init --no-rehash -)" +# lazy-load rbenv +if [ -d "$HOME/.rbenv/shims" ]; then + path_prepend "$HOME/.rbenv/shims" fi +rbenv() { + eval "$(command rbenv init -)" + rbenv "$@" +} + # lunchy auto-completion if [ -n "$BASH_VERSION" ]; then if which gem &> /dev/null && gem which lunchy &> /dev/null; then