Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

cmd has nothing to do with it. Just as bash has nothing to do with parsing terminal escape sequences. It's a shell. On Unix-likes a terminal or ~ emulator will handle those escape sequences, on Windows it's the console (provided by conhost). What program you run in the console (or terminal) is completely irrelevant.


you are right that conhost and bash are separate, but what i am saying is that conhost never supported color escape codes.


Isn't cmd.exe the Windows terminal emulator?


No, conhost.exe is (since Vista, prior to that it was a part of csrss). cmd.exe is simply the default command-line shell. To disprove your guess here, you can just observe the processes existing when running console applications. There's one conhost for each console window, but unless you run cmd, there'll be no cmd instances.

Windows didn't have a terminal emulator until recently anyway, as Windows console applications use the console APIs to change cursor position, color, etc. instead of having that API as part of the text stream that's output by applications.


> Windows didn't have a terminal emulator until recently anyway,

Well, actually....Hyperterminal :)

http://imgur.com/ukBjD7F

/gets coat.


Oh, fair point. I forgot about that. But it was never intended to be used with local console application ;-) (and ANSI.SYS goes back even further, I guess).


Nope, it's conhost.exe




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: