From 1a856cd3f1daf8a9795336f918ebdd7e0b7c992f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 25 Nov 2012 22:37:58 +0900 Subject: [PATCH] colored output of man pages --- bashrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bashrc b/bashrc index 54caf90..93a46c9 100755 --- a/bashrc +++ b/bashrc @@ -213,6 +213,18 @@ fi alias setup.py="sudo python3 setup.py install --record files.txt" +man() { + env \ + LESS_TERMCAP_mb=$(printf "\e[1;35m") \ + 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") \ + command man "$@" +} + scr(){ _tformat="%Y%m%d-%H%M%S%z" _file=`date +${_tformat}`.script