mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 15:26:23 -04:00
init: zsh: prepend hook to precmd_functions
This makes sure that $VIRTUAL_ENV is handled already in other precmd functions, especially your prompt.
This commit is contained in:
parent
521576e8c4
commit
f594876f31
|
|
@ -151,7 +151,7 @@ EOS
|
|||
cat <<EOS
|
||||
typeset -g -a precmd_functions
|
||||
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
||||
precmd_functions+=_pyenv_virtualenv_hook;
|
||||
precmd_functions=(_pyenv_virtualenv_hook \$precmd_functions);
|
||||
fi
|
||||
EOS
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ _pyenv_virtualenv_hook() {
|
|||
};
|
||||
typeset -g -a precmd_functions
|
||||
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
|
||||
precmd_functions+=_pyenv_virtualenv_hook;
|
||||
precmd_functions=(_pyenv_virtualenv_hook \$precmd_functions);
|
||||
fi
|
||||
EOS
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue