红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Ubuntu

彩色的man pages,让你寻找帮助时也赏心悦目

发布时间:2009-07-27 17:19:52来源:红联作者:kevinux
1.安装most, most和less类似,是一个文本查看工具,不过它支持彩色。
代码:
sudo aptitude install most

2. 配置 most
代码:
cat > ~/.mostrc << "EOF"
% Color settings

color normal lightgray black
color status yellow blue
color underline yellow black
color overstrike brightblue black


% less-like keybindings

unsetkey "^K"
unsetkey "g"
unsetkey "G"
unsetkey ":"

setkey next_file ":n"
setkey find_file ":e"
setkey next_file ":p"
setkey toggle_options ":o"
setkey toggle_case ":c"
setkey delete_file ":d"
setkey exit ":q"

setkey bob "g"
setkey eob "G"
setkey down "e"
setkey down "E"
setkey down "j"
setkey down "^N"
setkey up "y"
setkey up "^Y"
setkey up "k"
setkey up "^P"
setkey up "^K"
setkey page_down "f"
setkey page_down "^F"
setkey page_up "b"
setkey page_up "^B"
setkey other_window "z"
setkey other_window "w"
setkey search_backward "?"
setkey bob "p"
setkey goto_mark "'"
setkey find_file "E"
setkey edit "v"
EOF


代码:
cat >> ~/.bashrc << "EOF"
export PAGER='/usr/bin/most -s'
export BROWSER='/usr/bin/most -s'
EOF


代码:
source ~/.bashrc


就大功告成了。试试彩色的man吧。
文章评论

共有 0 条评论