mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-13 14:03:53 -05:00
Merge pull request #75 from blueyed/fix-zsh-typeset-precmd_functions
Use `typeset -g` with `precmd_functions`
This commit is contained in:
@@ -144,7 +144,7 @@ EOS
|
|||||||
;;
|
;;
|
||||||
zsh )
|
zsh )
|
||||||
cat <<EOS
|
cat <<EOS
|
||||||
typeset -a precmd_functions
|
typeset -g -a precmd_functions
|
||||||
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
||||||
precmd_functions+=_pyenv_virtualenv_hook;
|
precmd_functions+=_pyenv_virtualenv_hook;
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ _pyenv_virtualenv_hook() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
};
|
};
|
||||||
typeset -a precmd_functions
|
typeset -g -a precmd_functions
|
||||||
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
||||||
precmd_functions+=_pyenv_virtualenv_hook;
|
precmd_functions+=_pyenv_virtualenv_hook;
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user