mirror of https://github.com/python/cpython
Closes #29308: Merged fix from 3.6.
This commit is contained in:
commit
61fda05b82
|
@ -29,13 +29,15 @@ deactivate -nondestructive
|
|||
|
||||
$env:VIRTUAL_ENV="__VENV_DIR__"
|
||||
|
||||
# Set the prompt to include the env name
|
||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||
function global:_OLD_VIRTUAL_PROMPT {""}
|
||||
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
|
||||
function global:prompt {
|
||||
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
||||
_OLD_VIRTUAL_PROMPT
|
||||
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||
# Set the prompt to include the env name
|
||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||
function global:_OLD_VIRTUAL_PROMPT {""}
|
||||
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
|
||||
function global:prompt {
|
||||
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
||||
_OLD_VIRTUAL_PROMPT
|
||||
}
|
||||
}
|
||||
|
||||
# Clear PYTHONHOME
|
||||
|
|
Loading…
Reference in New Issue