You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I edited the global postactivate hook for my virtual environments, found by default in $WORKON_HOME. However, if I use the virtualenvwrapper plugin, as written in my .zshrc:
plugins=(git virtualenvwrapper)
the hooks do not execute.
To illustrate
I have a virtualenv named engg, and my postactivate hook has the following line:
echo 'Hello from postactivate'
Case 1. No virtualenvwrapper plugin
$ workon engg
Hello from postactivate
(engg) $
All well and good.
Case 2. Using the virtualenvwrapper plugin
$ workon engg
(engg) $
Me sad :(
A snippet from my .zshrc
It might help with debugging if you know the order of relevant commands in my .zshrc
@kitmonisit Did you find a solution or a work around for this? I am running into the exact same issue.
Also, I spent some time debugging this. If I manually source /usr/local/bin/virtualenvwrapper.sh in my .zshrc file, the hooks work correctly. If I manually source ~/oh-my-zsh/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh, the hooks work correctly. Is it possible that the hooks are being removed if the plugin is executed?
Summary
I edited the global
postactivate
hook for my virtual environments, found by default in$WORKON_HOME
. However, if I use thevirtualenvwrapper
plugin, as written in my.zshrc
:the hooks do not execute.
To illustrate
I have a virtualenv named
engg
, and mypostactivate
hook has the following line:Case 1. No
virtualenvwrapper
pluginAll well and good.
Case 2. Using the
virtualenvwrapper
pluginMe sad :(
A snippet from my
.zshrc
It might help with debugging if you know the order of relevant commands in my
.zshrc
The text was updated successfully, but these errors were encountered: