4 ms·
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
by ygra 10y ago
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.
- Sir_Cmpwn 10y agoIsn't cmd.exe the Windows terminal emulator?
- ygra 10y agoNo, 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.
- teh_klev 10y ago> Windows didn't have a terminal emulator until recently anyway, Well, actually....Hyperterminal :) http://imgur.com/ukBjD7F http://imgur.com/ukBjD7F /gets coat.
- ygra 10y agoOh, 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).
- reynoldsbd 10y agoNope, it's conhost.exe
- nunez 10y agoyou are right that conhost and bash are separate, but what i am saying is that conhost never supported color escape codes.