8000 [3.13] gh-122765: make prompt in activate.csh robust against unbalanc… · python/cpython@9aa85f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9aa85f5

Browse files
miss-islingtonJacekDuszenkobrettcannon
authored
[3.13] gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751) (GH-124185)
gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751) (cherry picked from commit a15a584) Co-authored-by: Jacek <jacek.duszenko@gmail.com> Co-authored-by: Brett Cannon <brett@python.org>
1 parent c2cb1a8 commit 9aa85f5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/venv/scripts/posix/activate.csh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ setenv VIRTUAL_ENV_PROMPT "__VENV_PROMPT__"
1919
set _OLD_VIRTUAL_PROMPT="$prompt"
2020

2121
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
22-
set prompt = "(__VENV_PROMPT__) $prompt"
22+
set prompt = "(__VENV_PROMPT__) $prompt:q"
2323
endif
2424

2525
alias pydoc python -m pydoc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix unbalanced quote errors occurring when activate.csh in :mod:`venv` was sourced with a custom prompt containing unpaired quotes or newlines.

0 commit comments

Comments
 (0)
0