Issue 15361: venv's Activate.ps1 causes broken prompt with powershell (original) (raw)

Issue15361

Created on 2012-07-15 19:02 by sbt, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
prompt.patch sbt,2012-07-15 19:02 review
Messages (2)
msg165545 - (view) Author: Richard Oudkerk (sbt) * (Python committer) Date: 2012-07-15 19:02
If I create a venv on Windows called "py3" then py3/Scripts/Activate.ps1 defines the prompt to be function prompt { Write-Host -NoNewline -ForegroundColor Green [(py3) ] _OLD_VIRTUAL_PROMPT } However this prompt function does not work properly, and running Write-Host -NoNewline -ForegroundColor Green [(py3) ] on its own produces an error because of the lack of quotes around (py3). Adding quotes as shown in the patch seems to fix the problem.
msg165549 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-15 20:58
New changeset 0b4d0c2173ad by Vinay Sajip in branch 'default': Closes #15361: Corrected venv prompt in PowerShell activation script. http://hg.python.org/cpython/rev/0b4d0c2173ad
History
Date User Action Args
2022-04-11 14:57:32 admin set github: 59566
2012-07-15 20:58:23 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: patch review -> resolved
2012-07-15 19:02:39 sbt create