Cmd can record the history of commands emitted and save it in a text file auto or per demand. #1398

Closed
opened 2026-01-30 22:25:03 +00:00 by claunia · 1 comment
Owner

Originally created by @ChristophePichaud on GitHub (May 29, 2019).

Summary of the new feature/enhancement

It's the specified view of item 1013 : https://github.com/microsoft/terminal/issues/1013
It's would be for cmd only for the moment.
A decidated issue could also be opened for Powershell.

Proposed technical implementation details (optional)

In readDataCooked.cpp in Terminal\src\host, in the function _handlePostCharInputLoop, there is a way to handle the history in cmd line. The feature is dedicated to cmd for the moment.
Are you interested in ?

NTSTATUS COOKED_READ_DATA::_handlePostCharInputLoop(const bool isUnicode, size_t& numBytes, ULONG& controlKeyState) noexcept
{
../..
if (FoundCR)
{
if (_commandHistory)
{
// add to command line recall list if we have a history list.
_commandHistory->Add({ _backupLimit // <- HERE
::MessageBox(NULL, _backupLimit, L"command", MB_OK); // <- simple check
}
../..

I would like to contribute to the Terminal Project and this could be a easy feature to begin with..

Originally created by @ChristophePichaud on GitHub (May 29, 2019). # Summary of the new feature/enhancement It's the specified view of item 1013 : https://github.com/microsoft/terminal/issues/1013 It's would be for cmd only for the moment. A decidated issue could also be opened for Powershell. # Proposed technical implementation details (optional) In readDataCooked.cpp in Terminal\src\host, in the function _handlePostCharInputLoop, there is a way to handle the history in cmd line. The feature is dedicated to cmd for the moment. Are you interested in ? NTSTATUS COOKED_READ_DATA::_handlePostCharInputLoop(const bool isUnicode, size_t& numBytes, ULONG& controlKeyState) noexcept { ../.. if (FoundCR) { if (_commandHistory) { // add to command line recall list if we have a history list. _commandHistory->Add({ _backupLimit // <- HERE ::MessageBox(NULL, _backupLimit, L"command", MB_OK); // <- simple check } ../.. I would like to contribute to the Terminal Project and this could be a easy feature to begin with..
Author
Owner

@DHowett-MSFT commented on GitHub (May 29, 2019):

Hi there. Thanks for filing a follow up to issue #1013. Just because we closed that issue, it doesn’t mean that we can’t continue having a discussion there.
Please help us out by keeping similar discussions all in one place! Thanks!

@DHowett-MSFT commented on GitHub (May 29, 2019): Hi there. Thanks for filing a follow up to issue #1013. Just because we closed that issue, it doesn’t mean that we can’t continue having a discussion there. Please help us out by keeping similar discussions all in one place! Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1398