What is going on with the command history scroll back?! #18743
-
I use a cmd.exe shell in windows terminal. Up until 5 months ago the command history behaviour was the same as cmd.exe, ie if you use the up arrow to scroll up to a previous command, run it, it does the weird thing where it preserves your "cursor" into the history such that you then have to press down arrow to the command before last. This is in contrast to the bash shell behaviour where after every run command you are at the bottom of the history, so down arrow does nothing. It's a weird behaviour but I was used to it. 5 months ago, I think after a windows update, this suddenly changed so it now had the bash behaviour. Annoying that it randomly happened without my input, but I actually prefer that behaviour so fine. Over the last few days I've had windows terminal crash 3 times, and on the 3rd restart the scroll back behaviour has now reverted to the cmd.exe one. How can I get it back to the bash style? It also seems the F7 history overlay is now broken. It works fine in cmd.exe, but through windows terminal it doesn't. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The changes to the history order came about when trying to avoid duplicate entries in the history (issue #17797). But this broke the workflow for people that relied on using the history to repeat a sequence of commands (issue #18138), so that change was reverted. The original issue has been reopened to track the problem. See also issue #13515.
This was an intentional change in the design - it was discussed in the 1.22 release blog post. It was necessary to get the history working with the new conpty "passthrough" implementation, which requires that menu to be implemented with pure VT sequences, and most terminals don't support the functionality needed to implement overlay windows with VT. That said, it's possible we may one day be able to get the old UI back on terminals that do have the required functionality. |
Beta Was this translation helpful? Give feedback.
The changes to the history order came about when trying to avoid duplicate entries in the history (issue #17797). But this broke the workflow for people that relied on using the history to repeat a sequence of commands (issue #18138), so that change was reverted. The original issue has been reopened to track the problem. See also issue #13515.
This was an intentional change in the design - it was discussed in the 1.22 release blog post. It was necessary to get the history working with the new conpty "passthrough" implementation, which requires that menu to be implemented with pure VT sequences, and most terminals don't support the func…