-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make activate
et al. export custom prompt prefix as an envvar
#2194
Comments
I'd be interested what core (venv) things about it, can you please create a ticket to https://bugs.python.org/ |
@gaborbernat Ticket created: https://bugs.python.org/issue45264 |
While no environment variable is created there is a |
Since 2020 venv does indeed set the |
I filed a PR against this issue (GH version of the issue) which ensures that |
@gaborbernat I think we can close this issue now? Thanks for merging! |
What's the problem this feature will solve?
I use a custom script (and I'm sure many others have similar scripts as well) for setting my prompt in Bash. It shows the name of the current virtualenv (if any) by querying the
VIRTUAL_ENV
environment variable, but if the virtualenv was created with a custom--prompt
, it is unable to use this prompt prefix, as theactivate
script does not make this information available.Describe the solution you'd like
The
activate
et al. scripts should set and export an environment variable named something likeVIRTUAL_ENV_PROMPT_PREFIX
that contains the prompt prefix (either custom or default) that virtualenv would prepend to the prompt. Ideally, this should be set even whenVIRTUAL_ENV_DISABLE_PROMPT
is set in case the user wants total control over their prompt.The text was updated successfully, but these errors were encountered: