Skip to content

PS1 isn't reset if empty #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shish opened this issue Mar 13, 2013 · 1 comment
Closed

PS1 isn't reset if empty #407

shish opened this issue Mar 13, 2013 · 1 comment
Assignees

Comments

@shish
Copy link

shish commented Mar 13, 2013

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
@ghost ghost assigned pfmoore Mar 13, 2013
@pfmoore
Copy link
Member

pfmoore commented Mar 14, 2013

A fix for this looks reasonably easy. I'll try to sort out a patch for it.

blueyed added a commit to blueyed/virtualenv that referenced this issue Mar 2, 2015
@Ivoz Ivoz closed this as completed in b31caa2 Sep 19, 2015
willingc pushed a commit to willingc/virtualenv that referenced this issue Oct 10, 2015
@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants