9

After getting tired of the default cygwin terminal, I decide to try rxvt. Everything seems fine except one thing: the color schemes for my git repositories stop working.

BTW other color schemes like the vim editor works fine under rxvt. I also ran this script to ensure that 256 colors are enabled.

My ~/.gitconfig looks something like this:

[user]
  name = xyz
  email = xyz@abc.com    
[color]
  diff = auto
  status = auto
  branch = auto
[core]
  autocrlf = false
Chris
  • 953
  • 11
  • 16
  • From the script you linked to: "doesn't work with rxvt and I don't know about other terms because it uses xterm color escapes..." and yet it worked? – Cascabel Nov 15 '10 at 19:19
  • Interesting, didn't notice that before. But that script did print out colors on my screen :) – Chris Nov 15 '10 at 20:08
  • Looking at the git source, I see explicit xterm character sequences for the colors, like `\033[31m` - my guess would be that those don't work in rxvt. The weird thing is that the script works. It looks like it's printing out essentially the same kinds of things, though they're 256 colors, not 16. Does rxvt somehow support 256 color xterm escape sequences, but not 16? – Cascabel Nov 15 '10 at 21:14
  • That could well be the case I guess. – Chris Nov 15 '10 at 23:21
  • 4
    Are you using Cygwin's git or a Windows git? Colours wouldn't work with the latter, as it would try to use Windows console APIs rather than escape sequences. Rxvt supports colour sequences just fine. – ak2 Nov 16 '10 at 10:45
  • Good point. I was using msysgit. I just tried cygwin git and it worked fine. – Chris Nov 16 '10 at 13:29
  • @gnfalex found a way to use `msysgit` and the colored output. – Adri C.S. Apr 02 '14 at 10:35

2 Answers2

21

If change all settings in ~/.gitconfig color section from "auto" to "always", then MSYSGit coloring work even in rxvt/mintty

[color]
    ui = always
    status = always
    branch = always
    diff = always
    interactive = always
gnfalex
  • 326
  • 2
  • 4
8

Thanks to suggestion by ak2, I solved this problem by switching from msysgit to cygwin's git.

Community
  • 1
  • 1
Chris
  • 953
  • 11
  • 16