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? |
Answered by
daxian-dbw
Nov 30, 2022
Replies: 1 comment 1 reply
|
You can use |
1 reply
Answer selected by
Marc013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
Set-PSReadLineOption -AddToHistoryHandlerto do the filtering. See https://learn.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.3#-addtohistoryhandler for more details.