# bat v0.19.0 - Product: bat (https://whatsnew.fyi/product/bat) - Vendor: David Peter - Date: 2022-01-08 - Version: v0.19.0 - Original notes: https://github.com/sharkdp/bat/releases/tag/v0.19.0 - Permalink: https://whatsnew.fyi/product/bat/releases/v0.19.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **changed** — Reduce startup time in loop-through mode by 90% - **changed** — Load themes lazily to make bat start 25% faster when disregarding syntax load time - **fixed** — Python syntax highlighting no longer suffers from abysmal performance in specific scenarios - **fixed** — Fix for poor performance when ANSI escape sequences are piped to bat - **fixed** — Fix for incorrect handling of ANSI escape sequences when using --wrap=never - **changed** — Load custom assets as fast as integrated assets - **added** — Support for x:-delta (minus) syntax in line ranges - **added** — Support for --ignored-suffix argument - **added** — $BAT_CONFIG_DIR is now a recognized environment variable with precedence over $XDG_CONFIG_HOME - **added** — Support for x:+delta syntax in line ranges - **added** — Add new --acknowledgements option that gives credit to theme and syntax definition authors - **changed** — Include git hash in bat -V and bat --version output if present - **fixed** — First line not shown in diff context - **fixed** — Do not ignore syntaxes that handle file names with a *.conf extension - **added** — Add PowerShell completion - **added** — Add Groff syntax highlighting - **added** — Add HTTP Requests and Responses syntax highlighting - **added** — Add LLVM syntax highlighting - **added** — Add Racket syntax highlighting - **deprecated** — Deprecate HighlightingAssets::syntaxes() and HighlightingAssets::syntax_for_file_name() in favor of HighlightingAssets::get_syntaxes() and HighlightingAssets::get_syntax_for_path() ##### Performance - Reduce startup time in loop-through mode (e.g. when redirecting output) by 90%. See #1747 (@Enselic) - Load themes lazily to make bat start 25% faster when disregarding syntax load time. See #1969 (@Enselic) - Python syntax highlighting no longer suffers from abysmal performance in specific scenarios. See #1688 (@keith-hall) - Fix for poor performance when ANSI escape sequences are piped to `bat`, see #1596 (@eth-p) - Fix for incorrect handling of ANSI escape sequences when using `--wrap=never`, see #1596 (@eth-p) - Load custom assets as fast as integrated assets, see #1753 (@Enselic) ##### Features - Support for `x:-delta` (minus) syntax in line ranges (e.g. `20:-10`). See #1901 (@bojan88) - Support for `--ignored-suffix` argument. See #1892 (@bojan88) - `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME`, see #1727 (@billrisher) - Support for `x:+delta` syntax in line ranges (e.g. `20:+10`). See #1810 (@bojan88) - Add new `--acknowledgements` option that gives credit to theme and syntax definition authors. See #1971 (@Enselic) - Include git hash in `bat -V` and `bat --version` output if present. See #1921 (@Enselic) ##### Bugfixes - First line not shown in diff context. See #1891 (@divagant-martian) - Do not ignore syntaxes that handle file names with a `*.conf` extension. See #1703 (@cbolgiano) ##### Other - Add PowerShell completion, see #1826 (@rashil2000) - Minimum supported Rust version (MSRV) bumped to 1.51, see #1994 (@mdibaiee) ##### Syntaxes - Groff, see #1685 (@scop) - HTTP Requests and Responses, see #1748 (@keith-hall) - LLVM, see #1777 (@ioncodes) - Highlight for `vimrc` and `gvimrc` files, see #1763 (@SuperSandro2000) - Syslog highlighting improvements, see #1793 (@scop) - Added support for `slim` syntax, see #1693 (@mfinelli) - Racket, see #1884 (@jubnzv) - LiveScript, see #1915 (@Enselic) - MediaWiki, see #1925 (@sorairolake) - The `requirements.txt` syntax has been removed due to incompatible license requirements. - Dart, new highlighter, see #1959 (@Ersikan) - SCSS and Sass syntaxes updated, see #1766 (@Enselic) - PowerShell syntax updated, see #1935 (@Enselic) - TypeScript syntax updated, see #1834 (@Enselic) ##### `bat` as a library - Deprecate `HighlightingAssets::syntaxes()` and `HighlightingAssets::syntax_for_file_name()`. Use `HighlightingAssets::get_syntaxes()` and `HighlightingAssets::get_syntax_for_path()` instead. They return a `Result` which is needed for upcoming lazy-loading work to improve startup performance. They also return which `SyntaxSet` the returned `SyntaxReference` belongs to. See #1747, #1755, #1776, #1862 (@Enselic) - Remove `HighlightingAssets::from_files` and `HighlightingAssets::save_to_cache`. Instead of calling the former and then the latter you now make a single call to `bat::assets::build`. See #1802, #1971 (@Enselic) - Replace the `error::Error(error::ErrorKind, _)` struct and enum with an `error::Error` enum. `Error(ErrorKind::UnknownSyntax, _)` becomes `Error::UnknownSyntax`, etc. Also remove the `error::ResultExt` trait. These changes stem from replacing `error-chain` with `thiserror`. See #1820 (@Enselic) - Add new `MappingTarget` enum variant `MapExtensionToUnknown`. Refer to its documentation for more information. Also mark `MappingTarget` as `#[non_exhaustive]` since more enum variants might be added in the future. See #1703 (@cbolgiano), #2012 (@Enselic)