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
Unable to change the CMD command history buffer size #13385
Area-ExtensibilityA feature that would ideally be fulfilled by us having an extension model.Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
When running CMD inside WT, there seems to be no way to change the history buffer size like I can do when running CMD natively, it is stuck at 50, which is not enough.
This would be a great idea for a potential user extension for Windows Terminal. But as far as I know there currently aren't any plans to offer shell-specific settings within the settings UI of Windows Terminal ourselves - it wouldn't align with the fundamental idea that Windows Terminal is just a "terminal" and shells need to provide their configurability in some other way.
In case of cmd.exe you can achieve your goal in two ways. As cmd /? notes:
If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Into the AutoRun value you can then write for instance doskey /listsize=100.
Alternatively, and maybe the safer option, you could modify your cmd profile to have a command line like this:
Unfortunately, this is not a shell setting. This is the murky gray area between the console and the shell.
In our case, it is the console host that stores command history and maintains the buffers. We are tracking making this configurable or infinite at /dup #2558 :)
That's true. Most folks who use Terminal moved on to newer shells that are receiving maintenance--which also generally maintain their own history data--rather than cmd, so it has not been prioritized very highly.
Area-ExtensibilityA feature that would ideally be fulfilled by us having an extension model.Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
Activity
237dmitry commentedon Jun 27, 2022
Version: 1.14.1452.0

alexolog commentedon Jun 27, 2022
This is the screen scrollback buffer, not the command history.
The CMD counterpart is:
Yes, the description is confusing.
237dmitry commentedon Jun 27, 2022
I think this is a problem of cmd.exe, Windows Terminal is just host for shells and console applications.
alexolog commentedon Jun 27, 2022
How exactly is this a problem with CMD? CMD exposes both options (command history and screen history), WT only exposes one (screen history).
alexolog commentedon Jun 27, 2022
I can have a history of more than 50 last entered commands in CMD.
For example, hitting F7:

When CMD runs under WT, only 50 entries are available and I cannot find a way to increase the limit because WT does not expose this setting.
237dmitry commentedon Jun 27, 2022
Now I understand, I completely forgot about this function. Yes it shows only 50 history items in WT then
doskey /historyshows full list.lhecker commentedon Jun 27, 2022
This would be a great idea for a potential user extension for Windows Terminal. But as far as I know there currently aren't any plans to offer shell-specific settings within the settings UI of Windows Terminal ourselves - it wouldn't align with the fundamental idea that Windows Terminal is just a "terminal" and shells need to provide their configurability in some other way.
In case of cmd.exe you can achieve your goal in two ways. As
cmd /?notes:Into the
AutoRunvalue you can then write for instancedoskey /listsize=100.Alternatively, and maybe the safer option, you could modify your cmd profile to have a command line like this:
DHowett commentedon Jun 27, 2022
Unfortunately, this is not a shell setting. This is the murky gray area between the console and the shell.
In our case, it is the console host that stores command history and maintains the buffers. We are tracking making this configurable or infinite at /dup #2558 :)
alexolog commentedon Jun 27, 2022
It's almost 3 years of tracking.
DHowett commentedon Jun 27, 2022
That's true. Most folks who use Terminal moved on to newer shells that are receiving maintenance--which also generally maintain their own history data--rather than cmd, so it has not been prioritized very highly.
alexolog commentedon Jun 29, 2022
That's quite the understatement.
Unfortunately,
doskey /listsizedoes not seem to work on my machine, even in a plain CMD window.o-sdn-o commentedon Oct 20, 2023
Alex (@alexolog) It is related to #16198.
alexolog commentedon Oct 21, 2023
That one is closed.
o-sdn-o commentedon Oct 21, 2023
There is a bug in the kernel and the fix for
doskey /listsizeis only available in Win11+.