Topic: Color man pages

This tip assumes you haven't changed the default pager from less.

Add the following to your ~/.bashrc to view man pages in color:

export LESS_TERMCAP_mb=$'\E[01;31m'       # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m'  # begin bold
export LESS_TERMCAP_me=$'\E[0m'           # end mode
export LESS_TERMCAP_se=$'\E[0m'           # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m'    # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m'           # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline

credit

FHSM: avoid vowels and exotic consonants and you'll get your handle every time.  identi.ca

Re: Color man pages

Oh quick follow up, if you are using the .bashrc file in the sticky thread the following might be a more acceptable color scheme:

#------------------------------------------////
# Color man pages:
#------------------------------------------////

export LESS_TERMCAP_mb=$'\E[01;31m'      # begin blinking
export LESS_TERMCAP_md=$'\E[01;31m'      # begin bold
export LESS_TERMCAP_me=$'\E[0m'          # end mode
export LESS_TERMCAP_se=$'\E[0m'          # end standout-mode                 
export LESS_TERMCAP_so=$'\E[01;44;33m'   # begin standout-mode - info box                              
export LESS_TERMCAP_ue=$'\E[0m'          # end underline
export LESS_TERMCAP_us=$'\E[01;32m'      # begin underline
FHSM: avoid vowels and exotic consonants and you'll get your handle every time.  identi.ca

Re: Color man pages

A somewhat simpler recipe for colored man pages (found @ http://www.dicas-l.com.br/dicas-l/20090718.php, in portuguese):

1. Install 'most':

$ sudo aptitude install most

2. Configure 'most' to handle man pages:

$ export MANPAGER="/usr/bin/most -s"

3. Test result:

$ man cp

If you want to make this change permanent, put the code in 2. into your ~/.bashrc ...

Re: Color man pages

Midas wrote:

1. Install 'most':

$ sudo aptitude install most

Done!

Midas wrote:

2. Configure 'most' to handle man pages:

$ export MANPAGER="/usr/bin/most -s"

Done!

Midas wrote:

3. Test result:

$ man cp

Worked!

Midas wrote:

If you want to make this change permanent, put the code in 2. into your ~/.bashrc ...

After the restart colors are back to normal...
any Ideas?

Slapfish aka Gravedigger (almost one year later)

EDIT:
I used the tip in http://crunchbanglinux.org/forums/post/71289/#p71289 which is enabling most in /etc/manpath.config

Slapfish aka the infinite-loop-maker

Last edited by slapfish (2010-06-10 12:51:12)