彩色man

今天新学一招,彩色man,让man变得多彩起来。说出来其实很简单,在~/.bashrc里增加一下内容

# For colourful man pages (CLUG-Wiki style)
export LESS_TERMCAP_mb=$’\E[01;31m’
export LESS_TERMCAP_md=$’\E[01;31m’
export LESS_TERMCAP_me=$’\E[0m’
export LESS_TERMCAP_se=$’\E[0m’
export LESS_TERMCAP_so=$’\E[01;44;33m’
export LESS_TERMCAP_ue=$’\E[0m’
export LESS_TERMCAP_us=$’\E[01;32m’

就这么简单,效果如下图:


ref: http://plog.longwin.com.tw/ost/1/409