首页 > 其他 > 详细

带彩色字体的man pages(debian centos)

时间:2015-05-27 16:01:56      阅读:234      评论:0      收藏:0      [点我收藏+]

简介
most
most is a paging program that displays,one windowful at a time,the contents of a file on a terminal.
It pauses after each windowful and prints on the window status line the screen the file name,
current line number, and the percentage of the file so far displayed.

一、debian
1、安装包
apt-get -y install most


2、在.bashrc最后1行添加
export PAGER="/usr/bin/most -s"


3、生效
source .bashrc

二、centos
1、直接在.bashrc最后1行添加man函数
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 "$@"
}


2、yum方式安装most

yum -y install most


三、参考
http://www.cyberciti.biz/faq/unix-linux-color-man-pages-configuration/


四、直接上图

技术分享

本文出自 “7928217” 博客,请务必保留此出处http://7938217.blog.51cto.com/7928217/1655616

带彩色字体的man pages(debian centos)

原文:http://7938217.blog.51cto.com/7928217/1655616

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!