mirror of https://github.com/ohmyzsh/ohmyzsh.git
virtualenvwrapper plugin fix #112852
when we're not in enabled mode and `DISABLE_VENV_CD=1`: - safely delete the chpwd hook `workon_cwd` if it were previously set up Signed-off-by: Maxim Kovgan <makovgan@redhat.com>
This commit is contained in:
parent
b9e73b4481
commit
1af0fedcf0
|
@ -89,4 +89,9 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
|||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd workon_cwd
|
||||
[[ $PWD != ~ ]] && workon_cwd
|
||||
else
|
||||
if [[ "${chpwd_functions[(Ie)workon_cwd]}" -ne 0 ]]; then
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook -d chpwd workon_cwd
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue