A cat(1) clone with syntax highlighting and Git integration. By default, bat pipes its own output to a pager (e.g. less) if the output is too large for one screen. If you would rather bat work like cat all the time (never page output), you can set --paging=never as an option, either on the command line or in your configuration file. If you intend to alias cat to bat in your shell configuration, you can use alias cat='bat --paging=never' to preserve the default behavior. Even with a pager set, you can still use bat to concatenate files. Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents, regardless of the --pager option's value. Use bat --list-themes to get a list of all available themes for syntax highlighting.

Features

  • bat supports syntax highlighting for a large number of programming and markup languages
  • You can use the -A/--show-all option to show and highlight non-printable characters
  • Show non-printable characters
  • Automatic paging
  • bat communicates with git to show modifications with respect to the index (see left side bar)
  • Git integration

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow BAT

BAT Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of BAT!

Additional Project Details

Programming Language

Rust

Related Categories

Rust Source Code Analysis Tool

Registered

2022-02-17