The console host in windows 10 now supports a range of ascii escape sequences. http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511)-Console-Host-Enhancements
I decided to try it out with a simple C program.
#include <stdio.h>
int main(int argc, char **argv ) {
printf( "e[31m Hello red world!e[0m" );
}
It actually works as expected via the default windows command prompt!
However Git Bash has done a whole lot of smart tweaks in order to get colors on earlier versions of the console host, which makes the output look like
▯[31m Hello red world!▯[0m
I've been through the HKEY_CURRENT_USER/Console settings in the windows registry and it doesn't seem like there is any console host settings that disables the colors in git bash.
Is there something that can remove whatever it is Git Bash does with the ASCII escapes that the new cmd doesn't so that ASCII color escape sequences can be used?
- - , .
برچسب:
نویسنده: استخدام کار