×

colorized man page

96
Mintisan
2016.08.16 22:59* 字数 23
origin `man zsh`

if u put the below config into .bashrc or .zshrc...

man() {
    env \
        LESS_TERMCAP_mb=$(printf "\e[1;31m") \
        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") \
            man "$@"
}

and source ~/.bashrc or source ~/.zshrc , u will get colorized man-pages.

modified

From

日记本
Web note ad 1