LinuxCommandLibrary

ccat

TLDR

Display file with syntax highlighting

$ ccat [file.py]
copy
Display multiple files
$ ccat [file1.go] [file2.js]
copy
Output as HTML
$ ccat --html [file.rb]
copy
Dark background colors
$ ccat --bg=dark [file.c]
copy
Show color palette
$ ccat --palette
copy

SYNOPSIS

ccat [options] file...

DESCRIPTION

ccat is a colorizing cat command that displays file contents with syntax highlighting. Supports JavaScript, Java, Go, Ruby, C, Python, JSON, and more. Single binary, native speed.

PARAMETERS

--html

Output as HTML
--bg=color
Background color: light, dark
-G key=color
Set custom color codes
--palette
Display color palette
-C, --color=mode
Color mode: always, never, auto

SUPPORTED LANGUAGES

- JavaScript / TypeScript
- Python
- Go
- Ruby
- C / C++
- Java
- JSON
- And more via Pygments

ALIASING

Replace cat with ccat:

$ alias cat='ccat'
copy
Add to ~/.bashrc for permanent use.

CAVEATS

Written in Go (owenthereal version) or Python (welbornprod version). Requires terminal with color support.

SEE ALSO

cat(1), bat(1), highlight(1)

Copied to clipboard