To colorize my man pages, I put this code from archlinux.org into .bashrc:
man() {
env LESS_TERMCAP_mb=$'\E[01;31m' \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
LESS_TERMCAP_se=$'\E[0m' \
LESS_TERMCAP_so=$'\E[38;5;246m' \
LESS_TERMCAP_ue=$'\E[0m' \
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
man "$@"
}
It works okay, except when I search with /
, the matches change colors to be even more obscure -- the opposite of highlighted. I spent some time trying to figure this out, but I can't really make sense of it, so if I do anything, it'll just be trial and error. Better to ask the experts. So how can I get search matches to be, say, black on yellow, please?
~/.profile
tip. – bongbang Nov 26 '14 at 00:05export LESS_TERMCAP_so=$'\E[01;33;03;40m'
, specifically the03;
portion? I see nothing about mode or color "03" in:man console_codes
. – aDroid Mar 29 '19 at 20:10