I recently discovered a small tool called bat, with 59k stars, written in Rust.


It's an enhanced version of cat, but with way more features.
When viewing code files, it automatically adds syntax highlighting, recognizing Python, JS, Go, Rust, and more.
It can also display Git change markers, showing which lines are added or deleted, all at a glance.
My favorite feature is its built-in pagination, so large files don't flood the screen all at once.
Press space to page through, just like less.
It also supports displaying line numbers, making bug hunting much easier.
Installation is simple: on macOS, just run brew install bat; on Linux, use your package manager.
After installing, set an alias to replace cat with bat—everyday use feels seamless, but the experience is greatly improved.
I tried viewing a log file with several thousand lines; previously, cat would just flood the screen, but now with highlighting and pagination, it’s much more comfortable.
→ If you want the link, just say "Yes," and I’ll send it to you.
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pin