bat: a cat on steroids
This post is an automatic translation from French. You can read the original version here.
There are simple tools that create a buzz when they come out. Bat is definitely one of them. It’s an alternative to the venerable cat, present on our Unix systems since time immemorial.
Bat is undeniably cute. It displays a nice header and does syntax highlighting for quite a few languages (the full list is here) using the syntect library. The advantages of Rust… I really need to get into it :)
Since a nice screenshot is worth a long explanation, here’s one:
The pager is automatically used, based on the content of the $PAGER variable in your session.
An important thing: bat detects when the output terminal is not interactive, and then renders plain output, just like cat. This is useful, for example, when you redirect the output stream to a file.
Finally, a special mention for the -A option, which displays non-printable characters:
Git integration is also included, with a gutter notation showing lines modified since the last commit.
When I tell you it’s beautiful!
Rancune.

