-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Environment
Windows build number: 18985 (Most Recent Windows Insider, Fast Track, Update)
Windows Terminal version (if applicable): Unknown, Installed from Windows Store on 08-31-2019
Any other software?
Running cygwin bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
Linking `cygwin1.dll`, `uname -a` in bash results in "CYGWIN_NT-10.0 <hostname hidden for privacy reason> 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin"
Steps to reproduce
Using cygwin bash,
Execute the following shell command: printf "\033[38;2;255;0;0mHi\033[0m".
Similar behavior is achieved from the C function printf in a standalone application, when compiled using a cygwin compiler, and linking the C function printf with the one defined by cygwin1.dll.
Other shells running in cygwin have not been tested, and lack of known functionality in cmd.exe and Powershell have made testing the shell command directly difficult. Tests of the C function, when compiled using Microsoft Visual Studio, have proved positive on all tested shells.
Expected behavior
Execution of the shell command on both native linux bash and cygwin bash when run through mintty.exe (cygwin tty host executable) prints Hi in bright red, the expected behavior.
Actual behavior
The "Hi" is printed correctly and the escape sequences are not printed in any form, however the color is not applied.
Additional Notes
I do not believe this is a bash issue, as it works correctly in both mintty provided by cygwin and in the bash shell run in a native linux environment. The likely cause is some disparity in the handling of ANSI Escape Sequences between cygwin glibc (provided by cygwin1.dll) and Windows Terminal. I will make further attempts to confirm this issue in cmd.exe and powershell using binaries linked against cygwin1.dll rather than Microsoft CRT.