Skip to content

5n7-sk/ccat

Repository files navigation

banner

build release license go version release

demo

ccat

ccat is the colored cat command.

Install

Binary

Get binary from releases.
If you already have jq and fzf or peco, you can download binary by running the following command.

curl -Ls https://api.github.com/repos/skmatz/ccat/releases/latest | jq -r ".assets[].browser_download_url" | fzf | wget -i -

Source

go get github.com/skmatz/ccat

Commands

> ccat --help

Usage:
  ccat [OPTIONS]

Application Options:
  -n, --number           Show contents with line numbers
  -b, --number-nonblank  Show contents with nonempty line numbers
  -E, --show-ends        Show $ at end of lines
  -T, --show-tabs        Show TAB characters as ^T
  -t, --theme=           Overwrite syntax highlighting theme
  -v, --version          Show ccat version

Help Options:
  -h, --help             Show this help message

Available Themes

We can use various themes.

  • adap
  • dracula
  • emacs
  • github
  • monokai (default)
  • pygments
  • solarized-dark
  • solarized-light
  • vim
  • ... more

themes

Set your favorite theme in ~/.config/ccat.json.
When you run ccat for the first time, the default configuration will be downloaded automatically.

Supported Languages

Thanks to alecthomas/chroma, almost all languages are supported.