Compare commits

...

2 Commits

Author SHA1 Message Date
Max Kovgan c7d4b62f19
Merge 1af0fedcf0 into d82669199b 2024-12-30 11:17:48 +01:00
Maxim Kovgan 1af0fedcf0 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>
2024-12-18 09:27:53 +02:00
1 changed files with 5 additions and 0 deletions

View File

@ -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