Skip to content

mattn/ccat

 
 

Repository files navigation

ccat

ccat is the colorizing cat. It works similar to cat but displays content with syntax highlighting.

Supported Languages

  • JavaScript
  • Java
  • Ruby
  • Python
  • Go
  • C

Installation

OSX

$ brew tap jingweno/ccat
$ brew install ccat

Reference: jingweno/homebrew-ccat

Arch Linux

$ pacaur -S ccat
$ pacaur -S ccat-git

The ccat package will reflect the current release snapshot, while the ccat-git will be based on the current source available in the master branch of the git repo. You can use any AUR helper in place of pacaur AUR Helpers

From source

Prerequisites:

$ go get -u github.com/jingweno/ccat

Usage

$ ccat FILE1 FILE2 ...
$ ccat --bg=dark FILE1 FILE 2 ... # dark background
$ ccat # read from standard input
$ curl https://raw.githubusercontent.com/jingweno/ccat/master/main.go | ccat

Demo

demo

Roadmap

  • nicer default color scheme
  • customizable color scheme
  • ?

FAQ

Why not pygments?

You could use pygments to achieve pretty much the same thing:

$ alias ccat="pygmentize -g"
$ ccat FILE1

ccat is a *nix alternative to pygments: no interpreter, one binary, native speed, POSIX standard etc..

License

MIT

Credits

Thanks to Sourcegraph who built this awesome syntax-highlighting package.

Sponsor this project

 

Packages

No packages published

Languages

  • Go 96.7%
  • Shell 3.3%