smartcd icon indicating copy to clipboard operation
smartcd copied to clipboard

virtualenv helper doesn't deactivate properly on leave

Open von opened this issue 4 years ago • 1 comments

The virtualenv helper doesn't evaluate the output of run_deactivate_if_present() when leaving (src)

               eval run_deactivate_if_present
               smartcd on-leave run_deactivate_if_present

This results in smartcd just printing the shell code instead of deactivating the virtualenv:

❯ cd
[ "`type -w deactivate`" = "function" ] && deactivate

von avatar Feb 05 '22 18:02 von

I also suspect the test for deactivate being defined is broken under zsh. Here is what I see with type -w:

❯ type -w deactivate
deactivate: function
❯ echo $ZSH_VERSION
5.8

von avatar Feb 05 '22 18:02 von