mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01: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:
parent
aa15ebad3e
commit
2c54428d6e
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,10 @@ for pyenvdir in "${pyenvdirs[@]}" ; do
|
||||||
export PYENV_ROOT=$pyenvdir
|
export PYENV_ROOT=$pyenvdir
|
||||||
export PATH=${pyenvdir}/bin:$PATH
|
export PATH=${pyenvdir}/bin:$PATH
|
||||||
eval "$(pyenv init - zsh)"
|
eval "$(pyenv init - zsh)"
|
||||||
|
|
||||||
|
if pyenv commands | command grep -q virtualenv-init; then
|
||||||
eval "$(pyenv virtualenv-init - zsh)"
|
eval "$(pyenv virtualenv-init - zsh)"
|
||||||
|
fi
|
||||||
|
|
||||||
function pyenv_prompt_info() {
|
function pyenv_prompt_info() {
|
||||||
echo "$(pyenv version-name)"
|
echo "$(pyenv version-name)"
|
||||||
|
|
Loading…
Reference in a new issue