Windows 10 Bash

Aug 11, 2014
18
0
#1
When I launch the Windows 10 Bash shell via TCC20 I am getting strange characters when I display and when I press the backspace. I am assuming this has to do with page type encoding possibly.

When I launch in windows natively I don't see these characters. How can I fix this when launching from a button in TCC?

Thanks,
Robb
 

Attachments

Last edited:
Aug 11, 2014
18
0
#2
I also noticed, when I use the attach tab option the native window that showed without the characters now shows the special characters once it is incorporated into TCC.

Robb
 
Aug 11, 2014
18
0
#6
Based on the help file, is Ansi support from external not supported? Is this correct? Will this be changed, since the Ubuntu bash now supports ansi output?
 
#10
I wonder how, exactly, this works. If I start CMD (outside TCMD) and it inherits my user-environment-defined PROMPT ($e[32;1m$p$g$s$e[0m), I get a nonsense PROMPT. If I attach that console to TCMD, I still have a nonsense PROMPT. But if, in a TCMD/TCC tab, I "START /TAB CMD", I have the green prompt. Likewise, ANSI works if I Tabs\Run ... NewTab ... CMD.

What's the difference?
 

rconn

Administrator
Staff member
May 14, 2008
10,785
97
#11
I wonder how, exactly, this works. If I start CMD (outside TCMD) and it inherits my user-environment-defined PROMPT ($e[32;1m$p$g$s$e[0m), I get a nonsense PROMPT. If I attach that console to TCMD, I still have a nonsense PROMPT. But if, in a TCMD/TCC tab, I "START /TAB CMD", I have the green prompt. Likewise, ANSI works if I Tabs\Run ... NewTab ... CMD.

What's the difference?
TCMD injects ANSIxx.dll into console apps that it starts. It does *not* inject it into ones that it attaches.
 

rconn

Administrator
Staff member
May 14, 2008
10,785
97
#12
If I use the following to launch the bash.exe, that seems to fix the ANSI issue

tcc /k C:\Windows\System32\bash.exe
It's not surprising that TCMD can't inject the ANSI dll into bash.exe, because the Windows 10 bash.exe is not a Windows console app. It's a linux subsystem app, and the bash ANSI escape sequences are (normally) handled by the linux subsystem.

What is surprising is that running bash in a TCC session allows the injection. Conhost is doing something peculiar (and different depending on who starts the console session). And it isn't specific to TCC - running a CMD tab window in TCMD and then starting bash.exe also works.

Since Microsoft has not yet provided documentation (or APIs) on the internal workings of the linux subsystem (or conhost) it's difficult to determine what is by design and what is simply not working. It may be as simple as a timing issue, or it may be fundamentally impossible to implement.