disable (and scrub existing) history permanently #3733
-
TL;DR: how to disable history? hi, I'm making a move from linux to windows development and I'm using pwsh with oh-my-posh and my prompt looks absolutely fabulous! just one thing that irks me is the history that tries to give me suggestions when I'm typing. at first I thought it was something to do with oh-my-posh itself, but after searching a bit it seems the functionality comes from PSReadLine. I just need history and the attempt to give me suggestions from it gone, but I don't want to disable auto completing, such as pressing tab after |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
welp, I should have done a bit more research! found the answer a bit after posting this, so I'll just share anyway:
real solution is to just disable predictions. duh. cheers! |
Beta Was this translation helpful? Give feedback.
welp, I should have done a bit more research! found the answer a bit after posting this, so I'll just share anyway:
https://www.blackhillsinfosec.com/new-powershell-history-defense-evasion-technique/Remove-Item (Get-PSReadlineOption).HistorySavePath
to delete historySet-PSReadLineOption -AddToHistoryHandler { return $false }
in your profile to disablereal solution is to just disable predictions. duh.
Set-PSReadLineOption -PredictionSource None
in the profile. k, I'm done editing now.cheers!