mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -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
|
||||
if ($global:NVS_ORIGINAL_LASTEXECUTIONSTATUS -is [bool]) {
|
||||
# make it compatible with NVS auto-switching, if enabled
|
||||
|
@ -436,8 +436,6 @@ Example:
|
|||
$global:LASTEXITCODE = $script:OriginalLastExitCode
|
||||
}
|
||||
|
||||
$Function:prompt = $promptFunction
|
||||
|
||||
# set secondary prompt
|
||||
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"
|
||||
"Get-PoshThemes"
|
||||
"Start-Utf8Process"
|
||||
"prompt"
|
||||
)
|
||||
} | Import-Module -Global
|
||||
|
||||
|
|
Loading…
Reference in a new issue