Join Nostr
2026-03-01 02:52:35 UTC
in reply to

Joel Bennett on Nostr: unfortunately, most shells add commands to the history _before_ they're executed, and ...

unfortunately, most shells add commands to the history _before_ they're executed, and PowerShell uses your raw history for "Predictions"

You can prevent most typos from being executed by pre-validating using:

Set-PSReadLineKeyHandler -key Enter -Function ValidateAndAcceptLine

You can also disable history predictions:

Set-PSReadLineOption -PredictionSource Plugin

Or customize the history handler:

Set-PSReadLineOption -AddToHistoryHandler { ... }