When I look at a man page in my 'console' (not an xterm
) I see some coloration, but I don't get this in my xterm
's (e.g. konsole
) is there any way I can enable this? hopefully a fairly simple solution?
Man Pages Colors – How to Enable Colors in Man Pages
colorslessmanpagertermcap
Best Answer
You need to use the
termcap(5)
feature. The man page on some Unices says this tool is obsolete and to useterminfo
, but it's still available on others (andterminfo
is more complicated).More importantly,
less
usestermcap
.Setting colors for
less
I do the following so that
less
andman
(which usesless
) will have color:And then in my
~/.bashrc
, I do this:NOTE: See Documentation on
LESS_TERMCAP_*
variables? for how this works.The final result