Closes #19139: Changed usage of __VENV_NAME__ and added __VENV_PROMPT__.

This commit is contained in:
Vinay Sajip 2013-10-02 11:36:16 +01:00
parent 7c411a4041
commit dff9e2535f
6 changed files with 11 additions and 7 deletions

View file

@ -34,7 +34,7 @@ $env:VIRTUAL_ENV="__VENV_DIR__"
function global:_OLD_VIRTUAL_PROMPT {""}
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
function global:prompt {
Write-Host -NoNewline -ForegroundColor Green '__VENV_NAME__'
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
_OLD_VIRTUAL_PROMPT
}

View file

@ -14,7 +14,7 @@ if defined _OLD_VIRTUAL_PYTHONHOME (
)
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
set "PROMPT=__VENV_NAME__%PROMPT%"
set "PROMPT=__VENV_PROMPT__%PROMPT%"
if defined PYTHONHOME (
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"