WAD ANSI issue

samintz

Scott Mintz
May 20, 2008
1,413
13
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.

1581616020490.png


In my tcmd.ini file I have:
[TakeCommand]
ANSIWin10=Yes
ANSI=No
[4NT]
ANSIWin10=Yes
ANSI=Yes

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

1581699312203.png


1581699367340.png
 

rconn

Administrator
Staff member
May 14, 2008
11,910
133
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.
 
Jan 12, 2014
386
7
Switzerland, SO
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 ...