From b21a62afb0a2ad8b21634840362e919b9ea7f14f Mon Sep 17 00:00:00 2001 From: Samuel Flores Date: Sat, 5 Jan 2013 11:43:37 -0300 Subject: [PATCH] Add chruby to known ruby version managers --- modules/ruby/init.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index b287cbb2..b0a46ba5 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -14,6 +14,11 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then # Source RVM. source "$HOME/.rvm/scripts/rvm" +# Load chruby into the shell session +elif [[ -s "/usr/local/share/chruby/chruby.sh" ]]; then + source "/usr/local/share/chruby/chruby.sh" + source "/usr/local/share/chruby/auto.sh" + # Load manually installed rbenv into the shell session. elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then path=("$HOME/.rbenv/bin" $path) @@ -32,7 +37,7 @@ else fi # Return if requirements are not found. -if (( ! $+commands[ruby] && ! ( $+commands[rvm] || $+commands[rbenv] ) )); then +if (( ! $+commands[ruby] && ! ( $+commands[rvm] || $+commands[rbenv] || $+commands[chruby] ) )); then return 1 fi