码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-05-27 16:02:18      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:man pages debian centos

简介
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)

标签:man pages debian centos

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!