Skip to content

PS1 isn't reset if empty #407

Closed
Closed

Description

@shish

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

Activity

  1. ghost assigned on Mar 13, 2013
  2. pfmoore commented on Mar 14, 2013

    @pfmoore
    Member

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

  3. added a commit that references this issue on Oct 10, 2015
    5c3f832
  4. locked and limited conversation to collaborators on Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions