summaryrefslogtreecommitdiff
path: root/plugins/rbenv/rbenv.plugin.zsh
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-09-03 13:05:24 -0400
committerAndrew Janke <andrew@apjanke.net>2015-09-03 13:05:24 -0400
commit93b4a6c02eeafb875de5d9bcccd73bdcd8265f40 (patch)
tree7cc87fcd416bf71cee77f30bf2e60cf607671f43 /plugins/rbenv/rbenv.plugin.zsh
parent689b5ab3c8c8bf30ee63cafb8401d7d95e41f359 (diff)
parent0532860c618aabc02d5dab34391b967e8e4c6272 (diff)
downloadzsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.gz
zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.bz2
zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.zip
Merge branch 'master' into osx-fix-tab-for-iterm
Conflicts: plugins/osx/osx.plugin.zsh
Diffstat (limited to 'plugins/rbenv/rbenv.plugin.zsh')
-rw-r--r--plugins/rbenv/rbenv.plugin.zsh9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
index 213e1beb0..ef5106f2d 100644
--- a/plugins/rbenv/rbenv.plugin.zsh
+++ b/plugins/rbenv/rbenv.plugin.zsh
@@ -2,14 +2,11 @@ _homebrew-installed() {
type brew &> /dev/null
}
-_rbenv-from-homebrew-installed() {
- brew --prefix rbenv &> /dev/null
-}
-
FOUND_RBENV=0
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
-if _homebrew-installed && _rbenv-from-homebrew-installed ; then
- rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
+if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null); then
+ rbenvdirs=($rbenv_homebrew_path "${rbenvdirs[@]}")
+ unset rbenv_homebrew_path
fi
for rbenvdir in "${rbenvdirs[@]}" ; do