Currently, the prompt is enclosed in parentheses, both in the venv and when storing:
PS N:\projects\cpython> python -m venv testvenv --prompt=" prompt with spaces "
Running Release|Win32 interpreter...
PS N:\projects\cpython> .\testvenv\Scripts\activate
( prompt with spaces ) PS N:\projects\cpython>
Contents of pyvenv.cfg:
home = N:\projects\cpython\PCbuild\win32
include-system-site-packages = false
version = 3.8.0
prompt = ( prompt with spaces )
I also tested using quotes in the prompt, which lead to opening issue 35667.
Here's a prompt that itself has parentheses:
PS N:\projects\cpython> python -m venv testvenv --prompt="(my prompt)"
Running Release|Win32 interpreter...
PS N:\projects\cpython> .\testvenv\Scripts\activate
((my prompt)) PS N:\projects\cpython>
It seemed to me that the parenthesis would allow the retrieval of both the original prompt definition and how it looked in display. Maybe my tests didn't demonstrate this clearly? |