Fix slow pyenv plugin issue based

daedfcab51 (diff-22fdd1fcfb)
This commit is contained in:
YounShin Kang 2017-02-16 15:12:18 +09:00
commit 45fef70a65

View file

@ -2,14 +2,11 @@ _homebrew-installed() {
type brew &> /dev/null
}
_pyenv-from-homebrew-installed() {
brew --prefix pyenv &> /dev/null
}
FOUND_PYENV=0
pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv" "/usr/local/opt/pyenv")
if _homebrew-installed && _pyenv-from-homebrew-installed ; then
pyenvdirs=($(brew --prefix pyenv) "${pyenvdirs[@]}")
if _homebrew-installed && pyenv_homebrew_path=$(brew --prefix pyenv 2>/dev/null); then
pyenvdirs=($pyenv_homebrew_path "${pyenvdirs[@]}")
unset pyenv_homebrew_path
fi
for pyenvdir in "${pyenvdirs[@]}" ; do