From 0829f921db39c5600b986a760bfb420152b12489 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 9 Feb 2012 22:31:04 -0500 Subject: [PATCH] Added support for package manager installed rbenv. --- plugins/ruby/init.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/ruby/init.zsh b/plugins/ruby/init.zsh index 93c5b62..1d87e71 100644 --- a/plugins/ruby/init.zsh +++ b/plugins/ruby/init.zsh @@ -12,10 +12,13 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then # Source RVM. source "$HOME/.rvm/scripts/rvm" -# Loads rbenv into the shell session. +# Loads manually installed rbenv into the shell session. elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then path=("$HOME/.rbenv/bin" $path) eval "$(rbenv init - zsh)" +# Loads package manager installed rbenv into the shell session. +elif (( $+commands[rbenv] )); then + eval "$(rbenv init - zsh)" else # Install local gems according to Mac OS X conventions. if [[ "$OSTYPE" == darwin* ]]; then