I just added this to my .bashrc
to get colorized output with less
:
# Colorize less man pages.
export LESS_TERMCAP_md=$'\e[01;34m'
export LESS_TERMCAP_us=$'\e[01;33m'
export LESS_TERMCAP_so=$'\e[01;44;37m'
export LESS_TERMCAP_mb=$'\e[01;31m'
export LESS_TERMCAP_mr=$'\e[01;35m'
export LESS_TERMCAP_me=$'\e[00m'
export LESS_TERMCAP_ue=$'\e[00m'
export LESS_TERMCAP_se=$'\e[00m'
... and now all of a sudden certain commands (seems to be related to displaying environment variables) produce color output that matches these new settings. Am I escaping wrong? Or is this intentional behavior? I tried a few other escape variations, but they didn't work with less
.
For example, here is a screenshot of an env
command.
php -i
also has colorized output, but only on the environment variables section.