Use Ccat on Linux to highlight your cat

Source: Internet
Author: User
Tags ubuntu package manager

Problem

Vim is highlighted, the terminal is highlighted, but there is no thought your cat is as usual gray, looking very uncomfortable, and no focus, to see what things, looks very laborious.

Pygments of the solution

I solved it with pygments before.
Official website http://pygments.org/
http://pygments.org/

See http://www.pocoo.org/projects/pygments/

SourceCode Access:
Http://bitbucket.org/birkenfeld/pygments-main [HG]

Issue Tracker:
Http://bitbucket.org/birkenfeld/pygments-main/issues

Mailinglist:
Http://groups.google.com/group/pocoo-libs
IRC Channel:

Pygment Introduction

Pygment is a syntax highlight for general use and can be used in WEB applications such as forums, wikis, and other areas.

Pygments is a generic syntax highlighter for general use with all kinds of software such as forum systems, wikis or other APS Plications that need to prettify source code.

Provides command-line tools and development packages to output formats including HTML, RTF, LaTex and ANSI sequences.

So it can be used instead of cat

Installation

You can download the source package from the official website or PyPI to compile and install

Of course pages can use the Python PIP Package Manager

sudo pip install Pygments

Or the Ubuntu Package Manager

sudo apt-get remove python-pygments

Disadvantages

Pygments itself is not created to replace cat, so it does not support cat parameter setting, so when we use some complex parameter information, it will fail.

Ccat about the solution

The ccat is a colored cat. It is similar to cat, but displays content and syntax highlighting

GitHub Https://github.com/jingweno/ccat
Binary Package Https://github.com/jingweno/ccat/releases

Please note that this is native to replace cat, but the current version of cat's parameter support is not good, but I feel that later version should be improved

Installation

I downloaded the latest version of the cat-1.1.0 binary package at the time of this writinglinux-amd64-1.1.0.tar.gz

After the download is complete unzip, we can see really only binary package ah, haha

We'll just copy this ccat executable to our system directory.

Let's put it in a directory with Cat.

sudo cp ./ccat /bin/

Then configure it to replace it cat , in his own profile ~/.BASHRC (current user) or the system's/ETC/BASHRC (all users)

#  usetofor syntax highlighting.                         alias cat="ccat"       
Use effect

Other

The official website mentions other alternative products, including the pygments we mentioned, and a source-highlight that looked like a pygments product.

Use Ccat on Linux to highlight your cat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.