diff options
author | Pavol Juhas <pavol.juhas@gmail.com> | 2014-03-17 19:48:10 -0400 |
---|---|---|
committer | Pavol Juhas <pavol.juhas@gmail.com> | 2014-03-17 19:48:10 -0400 |
commit | 6952105bfe1fd4121fd355dc5f8ec5e03de5541c (patch) | |
tree | 604e65e52df88e28f99f49b939aa9547eb009b1c /plugins/rbenv/rbenv.plugin.zsh | |
parent | ed19ffee5ecc0db6617c1ae753e515d60cb486c6 (diff) | |
parent | ca900216302aa1138c793971cf877b5d4e88fb06 (diff) | |
download | zsh-6952105bfe1fd4121fd355dc5f8ec5e03de5541c.tar.gz zsh-6952105bfe1fd4121fd355dc5f8ec5e03de5541c.tar.bz2 zsh-6952105bfe1fd4121fd355dc5f8ec5e03de5541c.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/rbenv/rbenv.plugin.zsh')
-rw-r--r-- | plugins/rbenv/rbenv.plugin.zsh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index 78f76c3a3..57ae2ca1f 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -10,12 +10,18 @@ FOUND_RBENV=0 rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") if _homebrew-installed && _rbenv-from-homebrew-installed ; then rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") + if [[ $RBENV_ROOT = '' ]]; then + RBENV_ROOT="$HOME/.rbenv" + fi fi for rbenvdir in "${rbenvdirs[@]}" ; do if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then FOUND_RBENV=1 - export RBENV_ROOT=$rbenvdir + if [[ $RBENV_ROOT = '' ]]; then + RBENV_ROOT=$rbenvdir + fi + export RBENV_ROOT export PATH=${rbenvdir}/bin:$PATH eval "$(rbenv init --no-rehash - zsh)" |