Console-Docs
Console-Docs copied to clipboard
How to replace SetConsoleHistoryInfo in a modern ConPTY world?
I've read that SetConsoleHistoryInfo
is deprecated, but I don't understand how to add command history capabilities to a shell I create with cmd /k
without this API. I've searched the issues (e.g. https://github.com/microsoft/terminal/issues/2558) and am unclear what this means for using cmd.exe
. The doc says
Tip
This API is not recommended and does not have a virtual terminal equivalent. This decision intentionally aligns the Windows platform with other operating systems where the individual client application acting as a shell or interpreter is expected to maintain its own user-convenience functionality like line reading and manipulation behavior including aliases and command history. Applications remoting via cross-platform utilities and transports like SSH may not work as expected if using this API.
Will cmd.exe
get rewritten to support ConPTY, and gain a new, "application-specific" way of configuring command history buffer count?