diff --git a/files/bash/.bashrc b/files/bash/.bashrc index 6fc69a1..2fef705 100644 --- a/files/bash/.bashrc +++ b/files/bash/.bashrc @@ -360,6 +360,22 @@ xset -b # } +## +# http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized +# colorized man pages +man() { + env \ + LESS_TERMCAP_mb=$(printf "\e[1;31m") \ + LC_ALL=C \ + LESS_TERMCAP_md=$(printf "\e[1;31m") \ + LESS_TERMCAP_me=$(printf "\e[0m") \ + LESS_TERMCAP_se=$(printf "\e[0m") \ + LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ + LESS_TERMCAP_ue=$(printf "\e[0m") \ + LESS_TERMCAP_us=$(printf "\e[1;32m") \ + MANWIDTH=$(expr $COLUMNS - 4) \ + man "$@" +} # Overrides the display provided by imagemagick function display() {