If less
is set as a viewer for man
pages then you have opportunity to overwrite standard colors, with less
special variables.
Example from my settings:
export LESS_TERMCAP_mb=$'\e[6m' # begin blinking
export LESS_TERMCAP_md=$'\e[34m' # begin bold
export LESS_TERMCAP_us=$'\e[4;32m' # begin underline
export LESS_TERMCAP_so=$'\e[1;33;41m' # begin standout-mode - info box
export LESS_TERMCAP_me=$'\e[m' # end mode
export LESS_TERMCAP_ue=$'\e[m' # end underline
export LESS_TERMCAP_se=$'\e[m' # end standout-mode
Additionally you may need to set
export GROFF_NO_SGR=''
due to some bug in "new" groff
behaviour.
I've checked in my linux box that if I set in console
export LESS_TERMCAP_md=$'\e[4m'
then instead of underlining (which is not possible under console) the code is indeed interpreted as light blue.
echo $PAGER
? – jimmij Aug 26 '15 at 12:41man -P less bash
explicitly has the same behavior (depending on whether I'm on a tty or in X). – Petr Skocik Aug 26 '15 at 13:49echo $TERM
(to show the terminal type being emulated), are they different? – Mark Plotnick Aug 26 '15 at 16:55xterm
under X, andlinux
in virtual console. But settingexport TERM=linux
in X doesn't change the behavior. – Petr Skocik Aug 26 '15 at 17:51