Skip to content

Commit

Permalink
fix(pwsh): restore prompt function override
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Jul 17, 2024
1 parent 17134cd commit 024c8b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/shell/scripts/omp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -478,6 +476,7 @@ Example:
"Export-PoshTheme"
"Get-PoshThemes"
"Start-Utf8Process"
"prompt"
)
} | Import-Module -Global

Expand Down

0 comments on commit 024c8b6

Please sign in to comment.