diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh index ec3ae9f5..1c6e66c6 100644 --- a/plugins/pyenv/pyenv.plugin.zsh +++ b/plugins/pyenv/pyenv.plugin.zsh @@ -9,6 +9,10 @@ _pyenv-from-homebrew-installed() { FOUND_PYENV=0 pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv") +if [[ -n "$PYENV_ROOT" ]]; then + pyenvdirs=($PYENV_ROOT "${pyenvdirs[@]}") +fi + for pyenvdir in "${pyenvdirs[@]}" ; do if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then FOUND_PYENV=1 diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index 7430e962..cb34b41a 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -12,6 +12,10 @@ if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null) fi fi +if [[ -n "$RBENV_ROOT" ]]; then + rbenvdirs=($RBENV_ROOT "${rbenvdirs[@]}") +fi + for rbenvdir in "${rbenvdirs[@]}" ; do if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then FOUND_RBENV=1