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

Skip to content

Commit a15a584

Browse files
gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751)
1 parent f4dd440 commit a15a584

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