ccat
is the colorizing cat
. It works similar to cat
but displays content with syntax highlighting.
- JavaScript
- Java
- Ruby
- Python
- Go
- C
$ brew tap jingweno/ccat
$ brew install ccat
Reference: jingweno/homebrew-ccat
$ 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
Prerequisites:
$ go get -u github.com/jingweno/ccat
$ 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
- nicer default color scheme
- customizable color scheme
- ?
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..
Thanks to Sourcegraph who built this awesome syntax-highlighting package.