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
{{ message }}
Repository navigation
Can't cycle through command history using the down-arrow #18138
Area-CookedReadThe cmd.exe COOKED_READ handlingIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-ConhostFor issues in the Console codebase
and then press UP ARROW three times to repeat echo 1 and then DOWN ARROW to cycle through echo 2, echo 3, echo 1, etc. Now the first DOWN ARROW does nothing.
I think both Command Prompt and PowerShell had this behavior. I do know I used that pattern of cycling through the history for Command Prompt quite frequently, but now I find that I must press UP ARROW three times each time I want to cycle through the last three commands. It would be nice to have the old behavior back.
I haven't found any documentation or bug reports that addresses this issue. Thanks in advance for your help.
Expected Behavior
After pressing UP ARROW three times and ENTER to execute the third command back in history, I expected pressing DOWN ARROW followed by ENTER to execute each of the past 3 commands in sequence ad infinitum.
Actual Behavior
After pressing UP ARROW three times and ENTER to execute the third command back in history, pressing DOWN ARROW does nothing. No previous command is recalled from history.
Thank you. I rolled back to v1.21.2361.0 (which works well enough and resolves this issue for the time being) and look forward to the release of v1.23.
Apparently that's how cmd has always worked if "Discard old duplicates" is enabled, huh. I wonder if I should double-down by changing the "Discard old duplicates" behavior and add the "circling" that you describe, or if I should revert enabling it by default under Windows Terminal.
i think a problem here is that the "replay" behaviour working consistently is dependent on not deleting old duplicate commands, since if you delete an old duplicate, you change the command sequence
i.e. with dedup
cls
echo 1
echo 2
echo 3
...
echo 2
means that "replaying" from cls onwards would then run
cls
echo 1
echo 3
i think that, if there can't be configuration on the user end, not having dedup is the better option since the only downside (afaik) is that it's inefficient usage of the history buffer (and to my knowledge that shoudn't be an issue if the history buffer is set to any reasonable size)
Area-CookedReadThe cmd.exe COOKED_READ handlingIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-ConhostFor issues in the Console codebase
Activity
ikkierie commentedon Nov 5, 2024
As a temporary measure, downgrading to release v1.21.2361.0 or lower rolls back this change.
dbc60 commentedon Nov 5, 2024
Thank you. I rolled back to v1.21.2361.0 (which works well enough and resolves this issue for the time being) and look forward to the release of v1.23.
lhecker commentedon Nov 21, 2024
Apparently that's how cmd has always worked if "Discard old duplicates" is enabled, huh. I wonder if I should double-down by changing the "Discard old duplicates" behavior and add the "circling" that you describe, or if I should revert enabling it by default under Windows Terminal.
ikkierie commentedon Nov 21, 2024
i think a problem here is that the "replay" behaviour working consistently is dependent on not deleting old duplicate commands, since if you delete an old duplicate, you change the command sequence
i.e. with dedup
means that "replaying" from cls onwards would then run
i think that, if there can't be configuration on the user end, not having dedup is the better option since the only downside (afaik) is that it's inefficient usage of the history buffer (and to my knowledge that shoudn't be an issue if the history buffer is set to any reasonable size)
Revert "Dedup command history by default (microsoft#17852)" (microsof…
Revert "Dedup command history by default (#17852)" (#18229)