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

欢迎使用CSDN-markdown编辑器

时间:2015-05-09 13:24:41      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:cat   less   more   颜色   

github地址:https://github.com/KevinOfNeu/colored-less-more-cat,含有详细安装使用教程。

colored-less-more-cat 技术分享

_______      _                       _    _
(_______)    | |                     | |  | |
_       ___ | | ___   ____ _____  __| |  | | _____  ___  ___    ____   ___   ____ _____
| |     / _ \| |/ _ \ / ___) ___ |/ _  |  | || ___ |/___)/___)  |    \ / _ \ / ___) ___ |
| |____| |_| | | |_| | |   | ____( (_| |  | || ____|___ |___ |  | | | | |_| | |   | ____|
\______)___/ \_)___/|_|   |_____)\____|   \_)_____|___/(___/   |_|_|_|\___/|_|   |_____)

Preview

技术分享

Usage

The prefix ‘c’ means colored!:)

cless file

cmore file

ccat [-bn] file

All above 3 commands are the same with less, more and cat except that the output with syntax color detected by the content!
You can type man cat, man less,man more for more info.

Prerequisites

Assume that you have pip installed! If not please follow
How to install pip

ALSO assume that you are using oh-my-zsh, I recommend you to have a try!
How to install oh-my-zsh

Dependencies

Intall Pygments (http://pygments.org)

$ sudo pip install pygments

Then run

$ pygmentize

If you get something NOT LIKE ‘command not found: pygmentizea’, then congtatulations!

Install

$ git@github.com:KevinOfNeu/colored-less-more-cat.git
$ cp -r colored-less-more-cat ~/.colored-less-more-cat
$ sudo vim ~/.zshrc

Add the following code into your .zshrc file.

  source ~/.colored-less-more-cat/core.sh

Save, open another Terminal tab,type cless .zshrc,cmore .zshrc,ccat .zshrc,FLY HIGH with colored output!

技术分享

喜欢就给个Star吧?

欢迎使用CSDN-markdown编辑器

标签:cat   less   more   颜色   

原文地址:http://blog.csdn.net/kevinofneu/article/details/45600389

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