You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When stepping through a function, one usually "spams" a combination of 'v' 'n' 'c' in debug mode. Once the function ends, or the user enters 'q', debug mode ends but those collection of debug commands are saved in the history of inputted commands, making it harder to find relevant commands in the history (pressing up on the keyboard) while searching through it. These debug commands should be disposed of from the history when debug mode ends because they are no longer useful in the scope of the session.
Thoughts/Findings
This needs work in both PSReadLine and PowerShell's History.cs file hence these issues being linked together
This also opens up the potential for new control mechanisms in PSReadLine for how we handle things like sensitive entries going forward as per #4197 and as such is linked to my issue #1886
Proposed implementation in PSReadLine
Provide config options to control saving history items when in debug mode - Save-Show/Save-DontShow/DontSave
When config set to NotSave - do not add items into the current psreadline file implementation or any future db implementation
When config set to Save-Show - add items into the current psreadline file implementation & show in the history lookup
When config set to Save-NotShow - add items into the current psreadline file implementation but mark as DontShow or any future db implementation
Similarly we'd need almost same implementation in PowerShell from my understanding
The text was updated successfully, but these errors were encountered:
kilasuit
changed the title
config options aroung saving history items when debuggin
config options aroung saving history items particularly when debugging
Sep 30, 2024
daxian-dbw
changed the title
config options aroung saving history items particularly when debugging
config options around saving history items particularly when debugging
Nov 6, 2024
Originally raised in the PowerShell/PowerShell repo in issue 24354 by @specerboatepic
Context / Rational
When stepping through a function, one usually "spams" a combination of 'v' 'n' 'c' in debug mode. Once the function ends, or the user enters 'q', debug mode ends but those collection of debug commands are saved in the history of inputted commands, making it harder to find relevant commands in the history (pressing up on the keyboard) while searching through it. These debug commands should be disposed of from the history when debug mode ends because they are no longer useful in the scope of the session.
Thoughts/Findings
This needs work in both PSReadLine and PowerShell's History.cs file hence these issues being linked together
This also opens up the potential for new control mechanisms in PSReadLine for how we handle things like sensitive entries going forward as per #4197 and as such is linked to my issue #1886
Proposed implementation in PSReadLine
Similarly we'd need almost same implementation in PowerShell from my understanding
The text was updated successfully, but these errors were encountered: