WAD ANSI issue


Scott Mintz
May 20, 2008
Solon, OH, USA
I have a git bash/docker image that I run within a Tcmd tab. It works great without any issues.
However, if I detach the tab and reattach the tab, the ANSI coloring stops working.


In my tcmd.ini file I have:

Windows 10 [Version 10.0.18362.592]
I see this same issue in both v25 and the v26 alpha.
You need only bash to see this. Below I started wsl in a tab, detached the tab (looked OK) and re-attached the tab.


This cannot be a TCMD issue, because TCMD never sets / resets the console ENABLE_VIRTUAL_TERMINAL_PROCESSING attribute. (It wouldn't do any good anyway, because it wouldn't affect the console app anyway unless I injected code into each console app to do the SetConsoleMode call.)

It also cannot be a TCC issue, because TCC will always call SetConsoleMode to set the ANSI processing before each command line.

Windows will turn off ANSI processing whenever it thinks the console handles are redirected (TCC turns it back on again after a redirection). I suspect Windows & WSL don't handle things very well when a console is shown & hidden.
JFI: I had the same issue WITHOUT WSL. I started TCMD ... just to check something quick ... I closed TCMD and opened again and "BOOM" no ANSI support. After close and reopen TCMD it has worked again ...

Similar threads