A year and three months after its previous v0.24, the developers behind the command-line tool Bat (written in Rust) have just released the new v0.25, bringing an exciting array of new features and improvements.
But wait, you haven’t heard of the bat
command? Let me break it down for you: it’s a smarter alternative to the traditional cat
with some pretty nice additions, such as efficient syntax highlighting, line numbering, automatic paging, Git integration, and more. Now, back to the novelties.
Bat v0.25 introduces new controls for squeezing blank lines. Users can apply the “–squeeze-blank” (or “-s“) flag to condense consecutive empty lines, while the newly added “–squeeze-limit” option sets the maximum number of allowable consecutive blank lines before they get merged.
These enhancements are perfect for those who frequently navigate through lengthy log files or read code bases with abundant spacing.
Moreover, Bat will now automatically select a suitable color theme based on a terminal’s color scheme—another touch that reflects the project’s commitment to streamlined workflows. At the same time, the update expands shell completion support, enabling users to generate completions via the “–completion <shell>” flag.
In addition to these improvements, Bat now handles binary content more gracefully through the “–binary=as-text” option, making it a breeze to inspect files in any situation. It also refines its syntax highlighting, adding support for JavaScript files that begin with “#!/usr/bin/env bun” and recognizing puppet code blocks within Markdown.
On the bug fixes side, Bat v0.25 also fixes several pesky bugs that users had reported. For instance, it addresses issues with OSC ANSI escape sequences, color attribute sequences, and handling extremely long file names in headers.
Plus, developers have improved the way Bat deals with inputs when color output is disabled, ensuring better performance under a wide variety of conditions.
Beyond features and bug fixes, this version ushers in optimizations such as faster startup times, deeper syntax mapping, and an upgraded build script. Fans of specialized file types will be delighted by new or improved syntax definitions for CFML, JSON-LD, puppet code blocks, and more.
Lastly, the software has introduced patched or improved themes that enhance manpage highlighting support.
For more information, refer to the tool’s GitHub changelog.