color display with man pages

Suvayu Ali fatkasuvayu+linux at gmail.com
Tue Jul 22 07:10:00 UTC 2014


Hi Amila,

On Mon, Jul 21, 2014 at 11:42:23PM +0530, Amila Perera wrote:
> man()
> {
> env LESS_TERMCAP_mb=$'\E[01;31m' \
> LESS_TERMCAP_md=$'\E[01;34m' \
> LESS_TERMCAP_me=$'\E[0m' \
> LESS_TERMCAP_se=$'\E[0m' \
> LESS_TERMCAP_so=$'\E[01;33;40m' \
> LESS_TERMCAP_ue=$'\E[0m' \
> LESS_TERMCAP_us=$'\E[01;04;35m' \
> man "$@"
> }

I tried with bash, it seems to work ... somewhat.  I see a yellow status
at the bottom, but otherwise I see a regular man page.  When I `type
man' after defining your function, I get a few colours among the variable
definitions (blue, red, and underlined).

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


More information about the users mailing list