Skip to content

Instantly share code, notes, and snippets.

@barseghyanartur
Last active April 29, 2026 21:18
Show Gist options
  • Select an option

  • Save barseghyanartur/21ec152ad147bbea741db55747cf36b6 to your computer and use it in GitHub Desktop.

Select an option

Save barseghyanartur/21ec152ad147bbea741db55747cf36b6 to your computer and use it in GitHub Desktop.
blog: bat is cat with extras

bat is cat with extras

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.py

A useful tweak - set page really high (put somewhere in your .bashrc or .zshrc):

export BAT_PAGER='less -R -z 5000'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment