Exclude unsuccessful inputs from ConsoleHost_history.txt #3760
Unanswered
God-damnit-all
asked this question in
Q&A
Replies: 1 comment 1 reply
-
There is no good way of doing this because PSReadLine save the command line to history file before returning it to PowerShell engine to execute. There is a way to validate the command line before returning it to PowerShell engine, it's done the combination of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes I look through ConsoleHost_history.txt to figure out how or why I did something prior. (I take notes but sometimes I'm in a rush to do something, you know how it is.)
However, I really wish that only successful inputs would make it to the log, i.e. if an error was thrown as a result of the input, don't log it. Is there a way to accomplish this? I don't mind if it impacts the performance within the terminal as long as it doesn't impact the performance of scripts.
Beta Was this translation helpful? Give feedback.
All reactions