File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,13 +29,15 @@ deactivate -nondestructive
2929
3030$env: VIRTUAL_ENV = " __VENV_DIR__"
3131
32- # Set the prompt to include the env name
33- # Make sure _OLD_VIRTUAL_PROMPT is global
34- function global :_OLD_VIRTUAL_PROMPT {" " }
35- copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
36- function global :prompt {
37- Write-Host - NoNewline - ForegroundColor Green ' __VENV_PROMPT__'
38- _OLD_VIRTUAL_PROMPT
32+ if (! $env: VIRTUAL_ENV_DISABLE_PROMPT ) {
33+ # Set the prompt to include the env name
34+ # Make sure _OLD_VIRTUAL_PROMPT is global
35+ function global :_OLD_VIRTUAL_PROMPT {" " }
36+ copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
37+ function global :prompt {
38+ Write-Host - NoNewline - ForegroundColor Green ' __VENV_PROMPT__'
39+ _OLD_VIRTUAL_PROMPT
40+ }
3941}
4042
4143# Clear PYTHONHOME
You can’t perform that action at this time.
0 commit comments