Closed
Description
If one activates a virtualenv while PS1 is empty (eg a non-login shell), then deactivates it, the environment name will be left in the prompt. This can then cause lots of confusion as scripts assume "PS1 is non-empty" == "interactive shell"
$ export PS1=
. myEnv/bin/activate
(myEnv) deactivate
(myEnv) # env name is still here after deactivate
$ export PS1=moo
moo . myEnv/bin/activate
(myEnv)moo deactivate
moo # env name is gone
Metadata
Metadata
Assignees
Labels
No labels
Activity
pfmoore commentedon Mar 14, 2013
A fix for this looks reasonably easy. I'll try to sort out a patch for it.
activate.sh: handle empty (but set) vars
Account for defined but empty shell variables