zaje is a syntax highlighter that aims to cover all your shell colouring needs.
With a spot of one-line shell functions, it can act as an ad-hoc replacement for both cat and tail.
Features
- Supports over a 100 lexers for programming languages, configuration and log formats and UNIX commands (this is done using the highlight Go package
- Can accept input as an argument as well as from an
STDINstream - Can detect the lexer to use based on:
- The file name (when acting in
catmode) - The first line of text (so it will usually work nicely when piping as well)
- The file name (when acting in
- Supports explicit specification of the lexer to use via a command-line arg and an
ENVvar - Easily to deploy: since it’s a Go CLI app, it’s one, statically linked executable with no dynamic deps
- Easily extendable: see Revising and adding new lexers for details
Installation
$ curl https://raw.githubusercontent.com/jessp01/zaje/master/install_zaje.sh > install_zaje.sh
$ ./install_zaje.sh