This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jwodder
Recipients jwodder
Date 2021-09-22.15:23:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632324221.63.0.136489331913.issue45264@roundup.psfhosted.org>
In-reply-to
Content
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 venv (if any) by querying the `VIRTUAL_ENV` environment variable, but if the venv was created with a custom `--prompt`, it is unable to use this prompt prefix, as the `activate` script does not make this information available.

I thus suggest that the `activate` et al. scripts should set and export an environment variable named something like `VIRTUAL_ENV_PROMPT_PREFIX` that contains the prompt prefix (either custom or default) that venv would prepend to the prompt.  Ideally, this should be set even when `VIRTUAL_ENV_DISABLE_PROMPT` is set in case the user wants total control over their prompt.

(This was originally posted as an issue for virtualenv at <https://github.com/pypa/virtualenv/issues/2194>, and it was suggested to post it here for feedback.)
History
Date User Action Args
2021-09-22 15:23:41jwoddersetrecipients: + jwodder
2021-09-22 15:23:41jwoddersetmessageid: <1632324221.63.0.136489331913.issue45264@roundup.psfhosted.org>
2021-09-22 15:23:41jwodderlinkissue45264 messages
2021-09-22 15:23:41jwoddercreate