Colors in Putty

Hi there!
I apologise for my silly question, but I couldn't handle it by my own.

I use Putty to enter FreeBSD Box from my Windows XP. I use git in the Box ang I've configured it to output colored diffs. But rather seeing colored text, I see ESC sequences put on the screen which prepend white text on black x(. See the screenshot. How can I make that work?

I configured putty to set env TERM to putty, I also tried xterm-color, but with no luck.
Same time ls -G shows colored list (??)

Please direct me the right direction to dig in.
Thanks in advance.
 
4cc9e7da.png
 
Also I notice that "git status" outputs colored text right way with no dependance to TERM env var, but "git show 5ac611b" outputs with some TERM values (term-color) ESC prepended texts where ESC words are inverted.

ps
how can I see TERM values supported by OS?
 
SirDice said:
They are defined in /etc/termcap. See termcap(3).

Thanks, SirDice )
I found putty term in it.

Also I found that
Code:
git show --color | tee null
produces colored output while
Code:
git show --color
doesn't. Strange, isn't it?

Now I think that effect is related likely to git, than to Putty or FreeBSD.
 
zloy said:
Now I think that effect is related likely to git, than to Putty or FreeBSD.
I think you may be right.

I don't use git but I regularly use cvs. This is what I use to compare diffs:

Code:
cvs diff -r 1.11 -r 1.12 somecode.pl | vim -Rf -

Vim will make everything nicely color coded :e
 
SirDice said:
I don't use git but I regularly use cvs. This is what I use to compare diffs:
Code:
cvs diff -r 1.11 -r 1.12 somecode.pl | vim -Rf -

Thanks SirDice :e Good luck!
 
The problem is like LESS

Add -R to your LESS environment variable. The less pager will strip some escape codes by default.

Mine is

Code:
LESS=-MMCR

-p.j.
 
Back
Top