I often when typing commands reference variables from my command history, and it has been bothering me a long time that the command I was typing before checking out history wasn't saved. I am so used to this functionality in PowerShell that it missing really started bugging me.
"commandHistoryIndex" is reset to -1 every time a valid command is typed, so I assumed checking this value would be the best way of determining whether we are looking at the history or not.
I often when typing commands reference variables from my command history, and it has been bothering me a long time that the command I was typing before checking out history wasn't saved. I am so used to this functionality in PowerShell that it missing really started bugging me.
"commandHistoryIndex" is reset to -1 every time a valid command is typed, so I assumed checking this value would be the best way of determining whether we are looking at the history or not.