From 88f4900e78e03e6a5d7137dc9ffe324447ecf618 Mon Sep 17 00:00:00 2001 From: Abhay Rana Date: Tue, 16 Aug 2016 17:03:01 +0530 Subject: [PATCH] Fixes man pages, now colored :rainbow: --- files/bash/.bashrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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() {