(Windows 10) GitBash 未格式化颜色 - 无法找到配置设置

(Windows 10) GitBash not formatting colors - can't find configuration settings

背景

我的 GitBash 命令行没有显示颜色或格式,似乎在转义字符...例如

The Entity shortcut name: CarBundle:Car
C[K7arBundle8a[K7rBundle8r[K7Bundle8B[K7undle8u[K7ndle8n[K7dle8d[K7le8l[K7e8e[K:[KC[Ka[Kr[K

经过一番挖掘,我找到了这个解决方案:

For displaying escaped characters, please try changing Git Bash options for terminal to "xterm-256color" by Right Click on Terminal > Options > Terminal > Type > xterm-256color

问题

老实说,我根本找不到这个配置设置...这是我最接近的...

如何实施上述解决方案?

A Windows CMD 不解释 ANSI 转义序列。

您可以按照“ANSI color in Windows shells" and download ansicon,用ansicon -i安装它(用ansicon -u卸载):那将是Windows 7.

Windows 10 does have support for ANSI colors, but note that with recent version of Windows 10, that might not work, as seen in this issue.

The problem is that for Windows 10.0.10586 it was enabled by default, but with Windows 10.0.14393 (Anniversary Update) it must be explicitly enabled by the program.

尝试在 CMD 中使用 git 命令而不是 git bash
通过将 %PATH% 添加到 <path/to/git>\usr\bin 文件夹,您仍然可以从 Linux 命令中受益,而无需输入 git bash.

对于遇到相同问题并找到此线程的任何人:

This solution 为我工作 Windows 10:

Was helped in another thread - Created a windows system variable FORCE_COLOR and had it set to true, did not restart, and now I have colors in Git Bash (windows 7)