mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(pwsh): restore prompt function override
This commit is contained in:
parent
17134cdb29
commit
024c8b6ed5
|
@ -397,7 +397,7 @@ Example:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$promptFunction = {
|
function prompt {
|
||||||
# store the orignal last command execution status
|
# store the orignal last command execution status
|
||||||
if ($global:NVS_ORIGINAL_LASTEXECUTIONSTATUS -is [bool]) {
|
if ($global:NVS_ORIGINAL_LASTEXECUTIONSTATUS -is [bool]) {
|
||||||
# make it compatible with NVS auto-switching, if enabled
|
# make it compatible with NVS auto-switching, if enabled
|
||||||
|
@ -436,8 +436,6 @@ Example:
|
||||||
$global:LASTEXITCODE = $script:OriginalLastExitCode
|
$global:LASTEXITCODE = $script:OriginalLastExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
$Function:prompt = $promptFunction
|
|
||||||
|
|
||||||
# set secondary prompt
|
# set secondary prompt
|
||||||
Set-PSReadLineOption -ContinuationPrompt ((Start-Utf8Process $script:OMPExecutable @("print", "secondary", "--config=$env:POSH_THEME", "--shell=$script:ShellName")) -join "`n")
|
Set-PSReadLineOption -ContinuationPrompt ((Start-Utf8Process $script:OMPExecutable @("print", "secondary", "--config=$env:POSH_THEME", "--shell=$script:ShellName")) -join "`n")
|
||||||
|
|
||||||
|
@ -478,6 +476,7 @@ Example:
|
||||||
"Export-PoshTheme"
|
"Export-PoshTheme"
|
||||||
"Get-PoshThemes"
|
"Get-PoshThemes"
|
||||||
"Start-Utf8Process"
|
"Start-Utf8Process"
|
||||||
|
"prompt"
|
||||||
)
|
)
|
||||||
} | Import-Module -Global
|
} | Import-Module -Global
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue