1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-23 21:01:58 +00:00

Fixd bug for pyenv plugin

Check pyenv-virtualenv can eval before use it.

Signed-off-by: Superbil <superbil@gmail.com>
This commit is contained in:
Superbil 2015-10-17 05:55:29 +08:00
parent aa15ebad3e
commit 2c54428d6e
No known key found for this signature in database
GPG key ID: 79E2966F2EA1461E

View file

@ -18,7 +18,10 @@ for pyenvdir in "${pyenvdirs[@]}" ; do
export PYENV_ROOT=$pyenvdir
export PATH=${pyenvdir}/bin:$PATH
eval "$(pyenv init - zsh)"
eval "$(pyenv virtualenv-init - zsh)"
if pyenv commands | command grep -q virtualenv-init; then
eval "$(pyenv virtualenv-init - zsh)"
fi
function pyenv_prompt_info() {
echo "$(pyenv version-name)"