color cat - cat(1) with regex-based syntax highlighting.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Aadhavan Srinivasan 28ee686295 Fixed typo 2 months ago
config Defined color mappings for Go 2 months ago
stack First commit 2 months ago
.gitignore Added gitignore file 2 months ago
Makefile First commit 2 months ago
README.md Fixed typo 2 months ago
color.go Added Dark Blue as a color 2 months ago
colorunit.go Replaced 'panic' with an error return, and a call to 'printAndExit' 2 months ago
config.go Wrote function to copy embedded config files to a config directory 2 months ago
errors.go Renamed 'printAndExit' to 'printErrAndExit' 2 months ago
go.mod First commit 2 months ago
go.sum First commit 2 months ago
main.go Changed behavior of program when 'disable color' flag is passed. 2 months ago
regcolor.go First commit 2 months ago
todo.txt Updated TODO 2 months ago
vision.txt First commit 2 months ago

README.md

ccat

ccat is a file printing tool (like 'cat') which uses Regular Expressions to enable syntax highlighting.


Features

  • Support for 11 colors: Red, Blue, Green, Magenta, Cyan, Black, White, Yellow, Gray, Orange and Dark Blue.
  • Adding more colors involves adding a line of code, then recompiling.
  • Regex-color mappings are stored in configuration files.
  • Uses the file extension to determine which configuration file to use.
  • Highly extensible - to add a config file for an specific file type, name the file <extension>.conf.
  • Support for printing line numbers with the -n flag.
  • Statically linked Go binary - no runtime dependencies, config files are distributed along with the binary.
  • Cross-platform

Installing

If you have the go command installed, run make after cloning the repository.

Getting Started

The config files are embedded within the binary. They will automatically be installed to the correct location (%APPDATA/ccat on Windows, ~/.config/ccat on UNIX) when the program is first run. TODO:

  • Allow user to define colors at runtime by reading RGB values from a config file.
  • Provide releases.