给帮助手册设置颜色
打开/etc/bashrc(需要root权限)或者~/.bashrc文件加入如下内容:
# Set colors for man pages
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 "$@"
}
重新打开终端,现在执行man就有颜色了。
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.