You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
venv activate.csh fails when user prompt contains newline #122765
activate.csh uses "$prompt" in quotes like that, which fails when the user prompt contains a newline (error: unbalanced quotes).
Using $prompt:q or "$prompt:q" solves this with no harm, at least in tcsh (not sure about vanilla csh), at least for activate. (Deactivate may have similar issue.)
It's fixable by extracting the concatenated __VENV_PROMPT__ and prompt to a separate variable and then using it with ":q" on the next line while setting the prompt.
Can send another PR with a fix if sounds good.
changed the title [-]venv activate.csh fails when user prompt contains newline. Easy to fix.[/-][+]venv activate.csh fails when user prompt contains newline[/+]on Sep 6, 2024
Activity
pythongh-122765 make prompt in activate.csh robust against unbalanced…
JacekDuszenko commentedon Sep 6, 2024
sent a PR with a fix however there is a similar issue with
__VENV_PROMPT__variable. When you set a custom prompt e.g. with --prompt='"' the script crashes @ https://github.com/python/cpython/blob/main/Lib/venv/scripts/posix/activate.csh#L22.It's fixable by extracting the concatenated
__VENV_PROMPT__andpromptto a separate variable and then using it with ":q" on the next line while setting the prompt.Can send another PR with a fix if sounds good.
[-]venv activate.csh fails when user prompt contains newline. Easy to fix.[/-][+]venv activate.csh fails when user prompt contains newline[/+]gh-122765: make prompt in activate.csh robust against unbalanced quot…
pythongh-122765: make prompt in activate.csh robust against unbalance…
pythongh-122765: make prompt in activate.csh robust against unbalance…
[3.13] gh-122765: make prompt in activate.csh robust against unbalanc…