How to prevent specific words, commands being logged in the PSReadLine history? #3502
-
I love the PSReadLine history and use of it quite often. Is there a way I can define a list of words, commands that should not be logged? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use |
Beta Was this translation helpful? Give feedback.
You can use
Set-PSReadLineOption -AddToHistoryHandler
to do the filtering. See https://learn.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.3#-addtohistoryhandler for more details.