mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
feat(pwsh): make it compatible with NVS auto-switching
This commit is contained in:
parent
fc80a8e11d
commit
3dc8538136
|
@ -331,8 +331,14 @@ Example:
|
||||||
}
|
}
|
||||||
|
|
||||||
function prompt {
|
function prompt {
|
||||||
# store the orignal last command execution status and last exit code
|
# store the orignal last command execution status
|
||||||
$script:OriginalLastExecutionStatus = $?
|
if ($global:NVS_ORIGINAL_LASTEXECUTIONSTATUS -is [bool]) {
|
||||||
|
# make it compatible with NVS auto-switching, if enabled
|
||||||
|
$script:OriginalLastExecutionStatus = $global:NVS_ORIGINAL_LASTEXECUTIONSTATUS
|
||||||
|
} else {
|
||||||
|
$script:OriginalLastExecutionStatus = $?
|
||||||
|
}
|
||||||
|
# store the orignal last exit code
|
||||||
$script:OriginalLastExitCode = $global:LASTEXITCODE
|
$script:OriginalLastExitCode = $global:LASTEXITCODE
|
||||||
|
|
||||||
Set-PoshPromptType
|
Set-PoshPromptType
|
||||||
|
|
Loading…
Reference in a new issue