Closed as duplicate of#132361
Closed as duplicate of#132361
Description
Bug report
Bug description:
Steps to reproduce
$ python3.12 --version
Python 3.12.11
$ python3.12 -m venv /tmp/test
$ cat /tmp/test/bin/activate
...
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1="("'(test) '") ${PS1:-}"
export PS1
fi
...
Actual result
((test) ) original prompt here $
The double parentheses look weird.
Expected result
(test) original prompt here $
Workaround
Either disable the automatic prompt-setting with export VIRTUAL_ENV_DISABLE_PROMPT=1
and put an alternative prompt-editing logic in your shell profile
Or modify the bin/activate scripts to remove the extra parentheses manually
CPython versions tested on:
3.12
Operating systems tested on:
macOS