Windows Powershell中的Mercurial颜色扩展

der*_*ann 16 windows powershell mercurial dvcs

有没有办法在Windows 7的Powershell中为Mercurial启用颜色支持?该ColorExtension页说要加

[color]
mode = win32
Run Code Online (Sandbox Code Playgroud)

到您的.hgrc文件,但它似乎没有什么区别.

运行hg status显示几个尚未添加到存储库的文件,我相信它们应该是粉红色(基于我见过的其他终端).这是显示的内容:

?[0;35;1;4m? samplefile.php?[0m
?[0;35;1;4m? anotherfile.php?[0m
?[0;35;1;4m? derpderp.xml?[0m
?[0;35;1;4m? derp_model.php?[0m
?[0;35;1;4m? stillnocolor.php?[0m
Run Code Online (Sandbox Code Playgroud)

Jay*_*kul 15

您可能需要更新到最新的mercurial(1.6.4).版本1.5.4特别没有正确地执行win32颜色(并且在最近的版本中已经修复了很多与颜色相关且与win32相关的错误).

您还需要确保未指定ANSI颜色模式.你可以强制win32:

[color]
mode = win32
Run Code Online (Sandbox Code Playgroud)