2017-01-14 40 views
0

背景(窗10)GitBash未格式化的色彩 - 無法找到配置設置

我GitBash命令行中沒有顯示的顏色或格式化似乎逃脫字符...例如

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

做一些挖後,我發現這個解決方案:

顯示轉義字符,請嘗試更改的Git的Bash 選項終端「的xterm-256color」通過右鍵單擊終端> 選項>終端>類型>的xterm-256color

問題

老實說,我無法找到此配置設置在所有...這是我來最接近...

enter image description here

如何實現上述解決方案?

回答

1

Windows CMD不解釋ANSI轉義序列。

您可以按照「ANSI color in Windows shells」和download ansicon,與ansicon -i(卸載與ansicon -u)安裝:這將是Windows 7的

Windows 10 does have support for ANSI colors,但是要注意最近版本的Windows 10的是,這可能無法正常工作,如this issue所示。

的問題是,對於Windows 10.0.10586它被默認啓用,但與Windows 10.0.14393(週年更新),則必須由程序明確啓用。

嘗試在CMD中使用您的git命令而不是git bash
通過添加到您的%PATH%<path/to/git>\usr\bin文件夾,您仍然可以從Linux命令中受益,而無需輸入git bash。

相關問題