mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 22:07:25 -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 {
|
||||
# store the orignal last command execution status and last exit code
|
||||
$script:OriginalLastExecutionStatus = $?
|
||||
# store the orignal last command execution status
|
||||
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
|
||||
|
||||
Set-PoshPromptType
|
||||
|
|
Loading…
Reference in a new issue