Neither cmd.exe nor powershell.exe are terminal emulators, rather they are both shells / scripting languages. The legacy looking crappy terminal window is usually conhost.exe.
Windows has a console interface unlike that found on Unix, using APIs rather than escape sequences to interface with the console. Also, its console implementation was historically coupled tightly with the conhost.exe application, which historically is both the terminal emulator and console endpoint simultaneously.
The blog series centered around
https://devblogs.microsoft.com/commandline/windows-command-l... is the best resource I've found online that discusses Windows' legacy console support as well as some vision of how this subsystem has changed in the years since.
These changes improved OS interop, but also de-couple the legacy crap so that third party terminal emulators can be better supported on Windows generally (separating the console endpoint from the terminal display), allowing for the creation of `CreatePseudoConsole()`.
Prior to this, third party terminal emulators that wanted to support Windows apps had to run the legacy conhost.exe and shove the window way off the desktop (to hide), and then scrape the window for its contents. This is/was required so that the app has a console backed by a conhost.exe process (responding to the console apis). `CreatePseudoConsole()` fixes a lot of that mess.
Windows has a console interface unlike that found on Unix, using APIs rather than escape sequences to interface with the console. Also, its console implementation was historically coupled tightly with the conhost.exe application, which historically is both the terminal emulator and console endpoint simultaneously.
The blog series centered around https://devblogs.microsoft.com/commandline/windows-command-l... is the best resource I've found online that discusses Windows' legacy console support as well as some vision of how this subsystem has changed in the years since.
These changes improved OS interop, but also de-couple the legacy crap so that third party terminal emulators can be better supported on Windows generally (separating the console endpoint from the terminal display), allowing for the creation of `CreatePseudoConsole()`.
Prior to this, third party terminal emulators that wanted to support Windows apps had to run the legacy conhost.exe and shove the window way off the desktop (to hide), and then scrape the window for its contents. This is/was required so that the app has a console backed by a conhost.exe process (responding to the console apis). `CreatePseudoConsole()` fixes a lot of that mess.