让man手册显示颜色

让man手册显示颜色,在bashrc或者bash_profile中添加以下几行。

# man color
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'

posted on 2009-05-22 14:40  DP.  阅读(292)  评论(0编辑  收藏  举报