15
7
Where do I have to take a look at in the system to colorize the man pages?
The man pages are viewed with less, so I tried adding the following lines to my .bashrc to change the colors: (Which works fine, btw.)
#
# L E S S C O L O R S F O R M A N P A G E S
#
# CHANGE FIRST NUMBER PAIR FOR COMMAND AND FLAG COLOR
# currently 0;33 a.k.a. brown, which is dark yellow for me
export LESS_TERMCAP_md=$'\E[0;33;5;74m' # begin bold
# CHANGE FIRST NUMBER PAIR FOR PARAMETER COLOR
# currently 0;36 a.k.a. cyan
export LESS_TERMCAP_us=$'\E[0;36;5;146m' # begin underline
# don't change anything here
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blinking
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
#########################################
# Colorcodes:
# Black 0;30 Dark Gray 1;30
# Red 0;31 Light Red 1;31
# Green 0;32 Light Green 1;32
# Brown 0;33 Yellow 1;33
# Blue 0;34 Light Blue 1;34
# Purple 0;35 Light Purple 1;35
# Cyan 0;36 Light Cyan 1;36
# Light Gray 0;37 White 1;37
#########################################
To my shame I have to admit that I did not find out what the second number pair meant, i.e. the 5;74
and the 5;146
.
Can someone clarify that further?
What is it with the close votes? I have known the wikipedia link before and still i have no idea what the order of the sequence means. Trial and error and setting different values did not help me at all. A simple "go RTFM" does not help me here. – sjas – 2012-07-21T23:12:44.993
You gotta be kidding me... this is just great! Where is this stuff documented? I looked in the BASH and LESS man pages but could not find the LESS_TERMCAP string. – ysap – 2013-01-23T08:21:12.043
OK, found this for starters: http://unix.stackexchange.com/questions/119/colors-in-man-pages
– ysap – 2013-01-23T08:23:27.053This: "
for name [ [ in [ word ... ] ] ; ] do list ; done
" makes more sense now, in color... 8-) – ysap – 2013-01-23T08:28:58.780@ysap : Haven't seen that links, and cannot remember where I found this. Put this here for documentation purposes and asked about the escape sequences in the process. :) – sjas – 2013-01-23T09:18:04.347