Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have colored man pages according to:

alias man="TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man"

so

man less 

looks like

enter image description here

but git blame --help is uncolored

share|improve this question

migrated from stackoverflow.com Mar 7 '12 at 22:20

This question came from our site for professional and enthusiast programmers.

1  
Voting to move to Super User, this is not a programming question. –  unwind Mar 7 '12 at 16:24
    
and man git-blame is uncolored too? –  Carlos Campderrós Mar 7 '12 at 16:29
    
no man git-blame is colored, I posted a revised pic. –  dasickis Mar 7 '12 at 19:24
add comment

1 Answer

up vote 3 down vote accepted

That's because git help does not execute your man alias, but the plain man command. Try setting TERMINFO, LESS, TERM and PAGER in the overall environment instead of inside the man alias.

share|improve this answer
    
Is there anyway to set the TERM variable just for man? This messes up all my other colors e.g. ls, vim, etc. –  dasickis Mar 7 '12 at 19:23
    
@dasickis: you could put TERM=mostlike /usr/bin/man in a script, say, ~/bin/man. –  larsmans Mar 7 '12 at 19:43
    
Thanks @larsmans that worked put that into my zshrc. –  dasickis Mar 7 '12 at 22:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.