diff options
author | Superbil <superbil@gmail.com> | 2015-10-17 05:55:29 +0800 |
---|---|---|
committer | Superbil <superbil@gmail.com> | 2015-10-19 15:13:06 +0800 |
commit | 2c54428d6e3c683e5b01b30d8405232f98668691 (patch) | |
tree | af83be18b39a4eeb8c9307e2158fefbcf42b3638 /plugins | |
parent | aa15ebad3e9c86fbd8dd5f01803066f82ece9593 (diff) | |
download | zsh-2c54428d6e3c683e5b01b30d8405232f98668691.tar.gz zsh-2c54428d6e3c683e5b01b30d8405232f98668691.tar.bz2 zsh-2c54428d6e3c683e5b01b30d8405232f98668691.zip |
Fixd bug for pyenv plugin
Check pyenv-virtualenv can eval before use it.
Signed-off-by: Superbil <superbil@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pyenv/pyenv.plugin.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh index b06507b62..aa1f9488a 100644 --- a/plugins/pyenv/pyenv.plugin.zsh +++ b/plugins/pyenv/pyenv.plugin.zsh @@ -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)" |