| Date: | 2026-04-21 17:00 |
|---|---|
| category: | Tech |
| tags: | shell, cat, bat |
| summary: | Use bat for a more readable terminal experience with syntax highlighting and Git integration. |
bat is a cat clone with extras. It improves terminal output by adding line numbers, syntax highlighting for various languages, and Git-aware gutter markers to show changes.
Usage example:
bat path/to/file.json
bat path/to/file.rst
bat path/to/file.md
bat path/to/file.pyA useful tweak - set page really high (put somewhere in your .bashrc or .zshrc):
export BAT_PAGER='less -R -z 5000'