Inconsistent behavior between executing directly from the command line and from inside a KeyHandler. #3826
Closed
3 tasks done
Labels
Resolution-By Design
The behavior is by design.
Prerequisites
Exception report
I intend for the action to clear all command history upon pressing Ctrl+k. However, it should retain the prompt to avoid an unpleasant visual and lack of command indication. When executing Clear-Host directly from the command line, it operates as intended. Yet, when invoking the same through the aforementioned KeyHandler, it wipes the prompt as well, leaving the screen entirely blank.
Screenshot
After pressing Ctrl+k
Using
Clear-Host
Environment data
Steps to reproduce
winget
.winget install JanDeDobbeleer.OhMyPosh -s winget
paradox
theme.How to set the theme? As following,
$PS code $PROFILE
oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\paradox.omp.json | Invoke-Expression
Clear-Host
Just compare the different behavior.
Expected behavior
I wish
Ctrl k
keyHandler has the same behavior as typeClear-Host
.Actual behavior
Ctrl k
will clear all characters in the terminal.The text was updated successfully, but these errors were encountered: