File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,15 @@ deactivate -nondestructive
29
29
30
30
$env: VIRTUAL_ENV = " __VENV_DIR__"
31
31
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
+ }
39
41
}
40
42
41
43
# Clear PYTHONHOME
You can’t perform that action at this time.
0 commit comments