man: linux的man手册使用

Tags: manual 

目录

修改man手册配色

在~/.bashrc中添加:

export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode - red
export LESS_TERMCAP_md=$(printf '\e[01;35m') # enter double-bright mode - bold, magenta
export LESS_TERMCAP_me=$(printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_se=$(printf '\e[0m') # leave standout mode    
export LESS_TERMCAP_so=$(printf '\e[01;33m') # enter standout mode - yellow
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
export LESS_TERMCAP_us=$(printf '\e[04;36m') # enter underline mode - cyan

修改man手册配色有详细的介绍:

The color codes are as follows:

30 – black
31 – red
32 – green
33 – orange
34 – blue
35 – magenta
36 – cyan
37 – white

Some other escape codes which you could use include:

0 – reset/normal
1 – bold
3 – italic/reversed
4 – underlined
5 – blink

You can check this by typing in a terminal something like:

printf '\e[31m'
printf '\e[32m'
printf '\e[37m'

So, if we have something like

 printf '\e[01;33m'

it means enter bold and color yellow, according to the listing above.

参考

  1. 修改man手册配色

推荐阅读

Copyright @2011-2019 All rights reserved. 转载请添加原文连接,合作请加微信lijiaocn或者发送邮件: [email protected],备注网站合作

友情链接:  系统软件  程序语言  运营经验  水库文集  网络课程  微信网文  发现知识星球