New submission from John Wodder <bugs.python....@varonathe.org>:
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.) ---------- components: Library (Lib) messages: 402444 nosy: jwodder priority: normal severity: normal status: open title: venv: Make activate et al. export custom prompt prefix as an envvar type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45264> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com