2023-10-11 18:43:52 +00:00
# unreleased
## Features
2023-12-18 17:38:11 +00:00
- Set terminal title to file names when Paging is not Paging::Never #2807 (@Oliver-Looney)
2020-12-17 02:35:31 +00:00
- `bat --squeeze` /`bat -s` will now squeeze consecutive empty lines, see #1441 (@eth-p)
- `bat --squeeze-limit` to set the maximum number of empty consecutive when using `--squeeze` , see #1441 (@eth-p)
- `PrettyPrinter::squeeze_empty_lines` to support line squeezing for bat as a library, see #1441 (@eth-p)
2023-12-18 17:32:08 +00:00
2023-10-11 18:43:52 +00:00
## Bugfixes
2024-01-21 16:27:59 +00:00
- Fix long file name wrapping in header, see #2835 (@FilipRazek)
2023-12-02 11:43:55 +00:00
- Fix `NO_COLOR` support, see #2767 (@acuteenvy)
2024-02-08 01:17:44 +00:00
- Fix handling of inputs with OSC ANSI escape sequences, see #2541 and #2544 (@eth-p)
2024-02-12 03:27:04 +00:00
- Fix handling of inputs with combined ANSI color and attribute sequences, see #2185 and #2856 (@eth-p)
2024-02-11 21:49:13 +00:00
- Fix panel width when line 10000 wraps, see #2854 (@eth-p)
2023-12-02 11:43:55 +00:00
2023-10-11 18:43:52 +00:00
## Other
2023-10-31 03:54:06 +00:00
- Upgrade to Rust 2021 edition #2748 (@cyqsimon)
2023-11-03 01:57:41 +00:00
- Refactor and cleanup build script #2756 (@cyqsimon)
2023-11-03 07:53:29 +00:00
- Checks changelog has been written to for PRs in CI #2766 (@cyqsimon)
2023-12-01 11:18:10 +00:00
- Use GitHub API to get correct PR submitter #2791 (@cyqsimon)
2023-11-05 12:23:05 +00:00
- Minor benchmark script improvements #2768 (@cyqsimon)
2023-12-01 20:26:35 +00:00
- Update Arch Linux package URL in README files #2779 (@brunobell)
2023-11-12 13:26:56 +00:00
- Update and improve `zsh` completion, see #2772 (@okapia)
2023-11-04 13:18:07 +00:00
- More extensible syntax mapping mechanism #2755 (@cyqsimon)
2023-12-25 15:20:12 +00:00
- Use proper Architecture for Debian packages built for musl, see #2811 (@Enselic)
2023-12-26 22:02:43 +00:00
- Pull in fix for unsafe-libyaml security advisory, see #2812 (@dtolnay)
2023-12-29 04:24:52 +00:00
- Update git-version dependency to use Syn v2, see #2816 (@dtolnay)
2024-02-10 05:45:29 +00:00
- Update git2 dependency to v0.18.2, see #2852 (@eth-p)
2024-02-12 06:29:25 +00:00
- Improve performance when color output disabled, see #2397 and #2857 (@eth-p)
2024-02-20 06:33:02 +00:00
- Relax syntax mapping rule restrictions to allow brace expansion #2865 (@cyqsimon)
2024-02-20 18:39:22 +00:00
- Apply clippy fixes #2864 (@cyqsimon)
2023-10-31 03:54:06 +00:00
2023-10-11 18:43:52 +00:00
## Syntaxes
2023-12-29 16:52:06 +00:00
- `cmd-help` : scope subcommands followed by other terms, and other misc improvements, see #2819 (@victor-gp)
2024-01-03 14:16:33 +00:00
- Upgrade JQ syntax, see #2820 (@dependabot[bot])
2024-02-20 06:54:43 +00:00
- Add syntax mapping for quadman quadlets #2866 (@cyqsimon)
2024-02-20 16:26:23 +00:00
- Map containers .conf files to TOML syntax #2867 (@cyqsimon)
2024-01-31 13:12:00 +00:00
- Associate `xsh` files with `xonsh` syntax that is Python, see #2840 (@anki-code).
2024-02-23 20:35:21 +00:00
- Added auto detect syntax for `.jsonc` #2795 (@mxaddict)
- Added auto detect syntax for `.aws/{config,credentials}` #2795 (@mxaddict)
2023-12-29 16:52:06 +00:00
2023-10-11 18:43:52 +00:00
## Themes
## `bat` as a library
2023-11-04 17:41:39 +00:00
- Changes to `syntax_mapping::SyntaxMapping` #2755 (@cyqsimon)
- `SyntaxMapping::get_syntax_for` is now correctly public
- [BREAKING] `SyntaxMapping::{empty,builtin}` are removed; use `SyntaxMapping::new` instead
- [BREAKING] `SyntaxMapping::mappings` is replaced by `SyntaxMapping::{builtin,custom,all}_mappings`
2024-01-10 12:49:50 +00:00
- Make `Controller::run_with_error_handler` 's error handler `FnMut` , see #2831 (@rhysd)
2023-12-28 22:38:35 +00:00
- Improve compile time by 20%, see #2815 (@dtolnay)
2023-10-11 18:43:52 +00:00
Bump version to v0.24.0
We need to bump 0.x.0 because the library API changed in incompatible
ways:
$ cargo public-api diff
Resolved `diff` to `diff 0.23.0`
Removed items from the public API
=================================
(none)
Changed items in the public API
===============================
-pub fn bat::controller::Controller<'b>::run(&self, inputs: alloc::vec::Vec<bat::input::Input<'_>>) -> bat::error::Result<bool>
+pub fn bat::controller::Controller<'b>::run(&self, inputs: alloc::vec::Vec<bat::input::Input<'_>>, output_buffer: core::option::Option<&mut dyn core::fmt::Write>) -> bat::error::Result<bool>
-pub fn bat::controller::Controller<'b>::run_with_error_handler(&self, inputs: alloc::vec::Vec<bat::input::Input<'_>>, handle_error: impl core::ops::function::Fn(&bat::error::Error, &mut dyn std::io::Write)) -> bat::error::Result<bool>
+pub fn bat::controller::Controller<'b>::run_with_error_handler(&self, inputs: alloc::vec::Vec<bat::input::Input<'_>>, output_buffer: core::option::Option<&mut dyn core::fmt::Write>, handle_error: impl core::ops::function::Fn(&bat::error::Error, &mut dyn std::io::Write)) -> bat::error::Result<bool>
Added items to the public API
=============================
[...]
2023-10-10 14:54:34 +00:00
# v0.24.0
2023-03-25 09:33:49 +00:00
## Features
2023-08-05 19:18:38 +00:00
- Add environment variable `BAT_PAGING` , see #2629 (@einfachIrgendwer0815)
2023-10-10 04:37:19 +00:00
- Add opt-in (`--features lessopen`) support for `LESSOPEN` and `LESSCLOSE` . See #1597 , #1739 , #2444 , #2602 , and #2662 (@Anomalocaridid)
2023-08-05 19:18:38 +00:00
2023-03-25 09:33:49 +00:00
## Bugfixes
2023-08-28 14:25:30 +00:00
- Fix `more` not being found on Windows when provided via `BAT_PAGER` , see #2570 , #2580 , and #2651 (@mataha)
2023-09-14 14:04:43 +00:00
- Switched default behavior of `--map-syntax` to be case insensitive #2520
2023-10-01 17:44:10 +00:00
- Updated version of `serde_yaml` to `0.9` . See #2627 (@Raghav-Bell)
2023-10-10 04:37:19 +00:00
- Fix arithmetic overflow in `LineRange::from` and `LineRange::parse_range` , see #2674 , #2698 (@skoriop)
- Fix paging not happening when stdout is interactive but stdin is not, see #2574 (@Nigecat)
- Make `-pp` override `--paging` and vice versa when passed as a later argument, see #2660 (@J-Kappes)
2023-10-04 21:53:31 +00:00
2023-03-25 09:33:49 +00:00
## Other
2023-03-25 10:56:40 +00:00
- Output directory for generated assets (completion, manual) can be customized, see #2515 (@tranzystorek-io)
2023-10-10 04:37:19 +00:00
- Use the `is-terminal` crate instead of `atty` , see #2530 (@nickelc)
- Add Winget Releaser workflow, see #2519 (@sitiom)
2023-08-28 14:25:30 +00:00
- Bump MSRV to 1.70, see #2651 (@mataha)
2023-03-25 10:56:40 +00:00
2023-03-25 09:33:49 +00:00
## Syntaxes
2023-06-01 05:25:02 +00:00
- Associate `os-release` with `bash` syntax, see #2587 (@cyqsimon)
2023-07-02 11:55:54 +00:00
- Associate `Containerfile` with `Dockerfile` syntax, see #2606 (@einfachIrgendwer0815)
2023-08-02 07:28:26 +00:00
- Replaced quotes with double quotes so fzf integration example script works on windows and linux. see #2095 (@johnmatthiggins)
2023-08-02 07:04:55 +00:00
- Associate `ksh` files with `bash` syntax, see #2633 (@johnmatthiggins)
2023-10-04 07:34:40 +00:00
- Associate `sarif` files with `JSON` syntax, see #2695 (@rhysd)
2023-08-07 20:37:13 +00:00
- Associate `ron` files with `rust` syntax, see #2427 (@YeungOnion)
2023-10-02 16:52:06 +00:00
- Add support for [WebGPU Shader Language ](https://www.w3.org/TR/WGSL/ ), see #2692 (@rhysd)
2023-10-10 04:37:19 +00:00
- Add `.dpkg-new` and `.dpkg-tmp` to ignored suffixe, see #2595 (@scop)
- fix: Add syntax mapping `*.jsonl` => `json` , see #2539 (@WinterCore)
- Update `Julia` syntax, see #2553 (@dependabot)
- add `NSIS` support, see #2577 (@idleberg)
- Update `ssh-config` , see #2697 (@mrmeszaros)
2023-06-01 05:25:02 +00:00
2023-03-25 09:33:49 +00:00
## `bat` as a library
2023-10-10 04:37:19 +00:00
- Add optional output_buffer arg to `Controller::run()` and `Controller::run_with_error_handler()` , see #2618 (@Piturnah)
2023-03-25 09:33:49 +00:00
2023-03-25 08:43:38 +00:00
# v0.23.0
2022-09-10 18:39:33 +00:00
## Features
2022-10-30 19:01:10 +00:00
2022-10-14 21:23:51 +00:00
- Implemented `-S` and `--chop-long-lines` flags as aliases for `--wrap=never` . See #2309 (@johnmatthiggins)
2022-11-02 21:14:48 +00:00
- Breaking change: Environment variables can now override config file settings (but command-line arguments still have the highest precedence), see #1152 , #1281 , and #2381 (@aaronkollasch)
2023-03-14 21:21:30 +00:00
- Implemented `--nonprintable-notation=caret` to support showing non-printable characters using caret notation. See #2429 (@einfachIrgendwer0815)
2022-09-10 18:39:33 +00:00
## Bugfixes
2022-11-03 02:30:27 +00:00
- Fix `bat cache --clear` not clearing the `--target` dir if specified. See #2393 (@miles170)
2022-09-10 18:39:33 +00:00
## Other
2022-10-30 19:01:10 +00:00
- Various bash completion improvements, see #2310 (@scop)
2022-12-18 10:46:43 +00:00
- Disable completion of `cache` subcommand, see #2399 (@cyqsimon)
2023-01-05 19:58:16 +00:00
- Signifigantly improve startup performance on macOS, see #2442 (@BlackHoleFox)
2023-03-03 12:20:03 +00:00
- Bump MSRV to 1.62, see #2496 (@Enselic)
2022-10-30 19:01:10 +00:00
2022-09-10 18:39:33 +00:00
## Syntaxes
2022-10-30 19:01:10 +00:00
- Added support for Ada, see #1300 and #2316 (@dkm)
2022-10-30 21:10:04 +00:00
- Added `todo.txt` syntax, see #2375 (@BANOnotIT)
2023-01-28 21:23:39 +00:00
- Improve Manpage.sublime-syntax. See #2364 (@Freed-Wu) and #2461 (@keith-hall)
2022-11-02 20:03:16 +00:00
- Added a new `requirements.txt` syntax, see #2361 (@Freed-Wu)
2022-11-04 21:08:51 +00:00
- Added a new VimHelp syntax, see #2366 (@Freed-Wu)
2022-12-03 16:09:39 +00:00
- Associate `pdm.lock` with `TOML` syntax, see #2410
2022-12-03 16:13:13 +00:00
- `Todo.txt` : Fix highlighting of contexts and projects at beginning of done.txt, see #2411
2022-12-07 02:50:35 +00:00
- `cmd-help` : overhaul scope names (colors) to improve theme support; misc syntax improvements. See #2419 (@victor-gp)
2023-03-17 20:48:12 +00:00
- Added support for Crontab, see #2509 (@keith-hall)
2022-10-30 19:01:10 +00:00
2022-09-10 18:39:33 +00:00
## Themes
## `bat` as a library
2022-11-19 22:37:43 +00:00
- `PrettyPrinter::header` correctly displays a header with the filename, see #2378 and #2406 (@cstyles)
2022-09-10 18:39:33 +00:00
2022-09-09 18:26:55 +00:00
# v0.22.1
2022-09-06 20:56:44 +00:00
## Bugfixes
2022-09-09 18:21:22 +00:00
- Bring back pre-processing of ANSI escape characters to so that some common `bat` use cases starts working again. See #2308 (@Enselic)
2022-09-06 20:56:44 +00:00
2022-09-06 20:22:06 +00:00
# v0.22.0
2022-02-27 07:40:56 +00:00
## Features
2022-05-24 17:29:03 +00:00
- Make the default macOS theme depend on Dark Mode. See #2197 , #1746 (@Enselic)
2022-09-04 19:03:27 +00:00
- Support for separate system and user config files. See #668 (@patrickpichler)
2022-03-06 18:45:05 +00:00
2022-02-27 07:40:56 +00:00
## Bugfixes
2022-08-12 12:27:47 +00:00
- Prevent fork nightmare with `PAGER=batcat` . See #2235 (@johnmatthiggins)
2022-08-14 19:09:13 +00:00
- Make `--no-paging` /`-P` override `--paging=...` if passed as a later arg, see #2201 (@themkat)
2022-08-16 20:42:15 +00:00
- `--map-syntax` and `--ignored-suffix` now works together, see #2093 (@czzrr)
2022-09-06 17:08:38 +00:00
- Strips byte order mark from output when in non-loop-through mode. See #1922 (@dag-h)
2022-08-12 12:27:47 +00:00
2022-02-27 07:40:56 +00:00
## Other
2022-05-16 19:37:59 +00:00
- Relaxed glibc requirements on amd64, see #2106 and #2194 (@sharkdp)
2022-08-27 13:05:05 +00:00
- Improved fish completions. See #2275 (@zgracem)
2022-08-29 16:49:29 +00:00
- Stop pre-processing ANSI escape characters. Syntax highlighting on ANSI escaped input is not supported. See #2185 and #2189 (@Enselic)
2022-03-03 04:58:44 +00:00
2022-02-27 07:40:56 +00:00
## Syntaxes
2022-06-04 12:12:42 +00:00
- NSE (Nmap Scripting Engine) is mapped to Lua, see #2151 (@Cre3per)
2022-07-23 00:37:18 +00:00
- Correctly color `fstab` dump and pass fields, see #2246 (@yuvalmo)
2022-08-12 15:08:32 +00:00
- Update `Command Help` syntax, see #2255
2022-08-14 19:10:05 +00:00
- `Julia` : Fix syntax highlighting for function name starting with `struct` , see #2230
2022-09-03 05:57:48 +00:00
- Minor update to `LiveScript` , see #2291
2022-07-04 14:01:36 +00:00
- Associate `.mts` and `.cts` files with the `TypeScript` syntax. See #2236 (@kidonng)
2022-07-04 21:30:52 +00:00
- Fish history is mapped to YAML. See #2237 (@kidonng)
2022-03-06 19:01:49 +00:00
2022-02-27 07:40:56 +00:00
## `bat` as a library
2022-09-03 10:33:38 +00:00
- Make `bat::PrettyPrinter::syntaxes()` iterate over new `bat::Syntax` struct instead of `&syntect::parsing::SyntaxReference` . See #2222 (@Enselic)
2022-09-06 07:32:06 +00:00
- Clear highlights after printing, see #1919 and #1920 (@rhysd)
2022-09-03 10:33:38 +00:00
2022-02-27 07:40:56 +00:00
2022-05-10 15:35:38 +00:00
# v0.21.0
2022-02-27 07:40:56 +00:00
## Features
2022-05-08 18:39:33 +00:00
- Correctly render tab stops in `--show-all` , see #2038 (@Synthetica9)
- Add a `--style=default` option and make it the default. It is less verbose than `full` , see #2061 (@IsaacHorvath)
- Enable BusyBox `less` as pager, see #2162 (@nfisher1226)
- File extensions are now matched case-insensitively. See #1854 , #2181 (@Enselic)
2022-03-06 18:45:05 +00:00
2022-02-27 07:40:56 +00:00
## Bugfixes
2022-04-02 18:03:54 +00:00
- Bump `regex` dependency from 1.5.4 to 1.5.5 to fix [CVE-2022-24713 ](https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html ), see #2145 , #2139 (@Enselic)
2022-05-07 11:43:11 +00:00
- `bat` no longer crashes when encountering files that references missing syntaxes. See #915 , #2181 (@Enselic)
## Performance
- Skip syntax highlighting on long lines (> 16384 chars) to help improve performance. See #2165 (@keith-hall)
- Vastly improve startup time by lazy-loading syntaxes via syntect 5.0.0. This makes bat display small files ~75% faster than before. See #951 , #2181 (@Enselic)
2022-04-02 18:03:54 +00:00
2022-02-27 07:40:56 +00:00
## Other
2022-04-02 17:46:43 +00:00
- Include info about custom assets in `--diagnostics` if used. See #2107 , #2144 (@Enselic)
2022-03-03 04:58:44 +00:00
2022-02-27 07:40:56 +00:00
## Syntaxes
2022-03-06 19:01:49 +00:00
- Mapped clang-format config file (.clang-format) to YAML syntax (@TruncatedDinosour)
2022-03-21 18:00:58 +00:00
- log syntax: improved handling of escape characters in double quoted strings. See #2123 (@keith-hall)
2022-04-27 20:51:10 +00:00
- Associate `/var/spool/mail/*` and `/var/mail/*` with the `Email` syntax. See #2156 (@cyqsimon)
2022-04-26 17:42:18 +00:00
- Added cmd-help syntax to scope --help messages. See #2148 (@victor-gp)
2022-05-05 18:29:17 +00:00
- Slightly adjust Zig syntax. See #2136 (@Enselic)
2022-05-10 18:27:48 +00:00
- Associate `.inf` files with the `INI` syntax. See #2190 (@Enselic)
2022-03-06 19:01:49 +00:00
2022-02-27 07:40:56 +00:00
## `bat` as a library
2022-04-02 15:00:08 +00:00
- Allow configuration of `show_nonprintable` with `PrettyPrinter` , see #2142
2022-05-07 11:43:11 +00:00
- The binary format of syntaxes.bin has been changed due to syntaxes now being lazy-loaded via syntect 5.0.0. See #2181 (@Enselic)
- Mark `bat::error::Error` enum as `#[non_exhaustive]` to allow adding new variants without future semver breakage. See #2181 (@Enselic)
- Change `Error::SyntectError(syntect::LoadingError)` to `Error::SyntectError(syntect::Error)` . See #2181 (@Enselic)
- Add `Error::SyntectLoadingError(syntect::LoadingError)` enum variant. See #2181 (@Enselic)
2022-02-27 07:40:56 +00:00
2022-02-26 16:27:34 +00:00
# v0.20.0
2022-01-08 18:44:42 +00:00
## Features
2022-02-07 19:48:57 +00:00
- New style component `header-filesize` to show size of the displayed file in the header. See #1988 (@mdibaiee)
2022-02-14 18:02:14 +00:00
- Use underline for line highlighting on ANSI, see #1730 (@mdibaiee)
2022-02-07 19:48:57 +00:00
2022-01-08 18:44:42 +00:00
## Bugfixes
2022-02-24 06:57:23 +00:00
- Fix bash completion on bash 3.x and bash-completion 1.x. See #2066 (@joshpencheon)
2022-01-08 18:44:42 +00:00
## Syntaxes
2022-02-07 16:34:35 +00:00
- `GraphQL` : Add support for interfaces implementing interfaces and consider ampersand an operator. See #2000
2022-02-06 21:29:36 +00:00
- Associate `_vimrc` and `_gvimrc` files with the `VimL` syntax. See #2002
2022-02-06 20:20:24 +00:00
- Associate `poetry.lock` files with the `TOML` syntax. See #2049
2022-02-08 16:11:31 +00:00
- Associate `.mesh` , `.task` , `.rgen` , `.rint` , `.rahit` , `.rchit` , `.rmiss` , and `.rcall` with the `GLSL` syntax. See #2050
2022-02-12 19:18:21 +00:00
- Added support for `JQ` syntax, see #2072
2022-02-26 16:01:00 +00:00
- Properly associate global git config files rooted in `$XDG_CONFIG_HOME/git/` or `$HOME/.config/git/` . See #2067 (@cyqsimon)
2022-02-06 20:20:24 +00:00
2022-01-08 18:44:42 +00:00
## `bat` as a library
2022-02-08 07:00:12 +00:00
- Exposed `get_syntax_set` and `get_theme` methods on `HighlightingAssets` . See #2030 (@dandavison)
2022-02-26 16:27:34 +00:00
- Added `HeaderFilename` and `HeaderFilesize` to `StyleComponent` enum, and mark it `#[non_exhaustive]` . See #1988 (@mdibaiee)
2022-01-08 18:44:42 +00:00
2022-01-07 08:54:04 +00:00
# v0.19.0
## 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)
2020-08-31 08:45:34 +00:00
2021-02-28 22:28:59 +00:00
## Features
2021-05-12 20:46:44 +00:00
2021-11-23 23:47:43 +00:00
- Support for `x:-delta` (minus) syntax in line ranges (e.g. `20:-10` ). See #1901 (@bojan88)
2021-11-19 16:05:23 +00:00
- Support for `--ignored-suffix` argument. See #1892 (@bojan88)
2021-08-14 19:42:34 +00:00
- `$BAT_CONFIG_DIR` is now a recognized environment variable. It has precedence over `$XDG_CONFIG_HOME` , see #1727 (@billrisher)
2021-08-22 15:59:24 +00:00
- Support for `x:+delta` syntax in line ranges (e.g. `20:+10` ). See #1810 (@bojan88)
2021-12-11 13:00:45 +00:00
- Add new `--acknowledgements` option that gives credit to theme and syntax definition authors. See #1971 (@Enselic)
2022-01-07 08:54:04 +00:00
- Include git hash in `bat -V` and `bat --version` output if present. See #1921 (@Enselic)
2021-02-28 22:28:59 +00:00
2021-05-12 20:55:25 +00:00
## Bugfixes
2021-10-09 11:35:27 +00:00
- First line not shown in diff context. See #1891 (@divagant-martian)
2021-10-25 15:59:12 +00:00
- Do not ignore syntaxes that handle file names with a `*.conf` extension. See #1703 (@cbolgiano)
2021-05-12 20:55:25 +00:00
Load independent and minimal syntax sets when using --language (#1787)
This significantly speeds up the startup time of bat, since only a single
linked SyntaxDefinition is loaded for each file. The size increase of the
binary is just ~400 kB.
In order for startup time to be improved, the --language arg must be used, and
it must match one of the following names:
"Plain Text", "ActionScript", "AppleScript", "Batch File", "NAnt Build File",
"C#", "C", "CSS", "D", "Diff", "Erlang", "Go", "Haskell", "JSON", "Java
Properties", "BibTeX", "LaTeX Log", "TeX", "Lisp", "Lua", "MATLAB", "Pascal",
"R", "Regular Expression", "Rust", "SQL", "Scala", "Tcl", "XML", "YAML", "Apache
Conf", "ARM Assembly", "Assembly (x86_64)", "CMakeCache", "Comma Separated
Values", "Cabal", "CoffeeScript", "CpuInfo", "Dart Analysis Output", "Dart",
"Dockerfile", "DotENV", "F#", "Friendly Interactive Shell (fish)", "Fortran
(Fixed Form)", "Fortran (Modern)", "Fortran Namelist", "fstab", "GLSL",
"GraphQL", "Groff/troff", "group", "hosts", "INI", "Jinja2", "jsonnet",
"Kotlin", "Less", "LLVM", "Lean", "MemInfo", "Nim", "Ninja", "Nix", "passwd",
"PowerShell", "Protocol Buffer (TEXT)", "Puppet", "Rego", "resolv", "Robot
Framework", "SML", "Strace", "Stylus", "Solidity", "Vyper", "Swift",
"SystemVerilog", "TOML", "Terraform", "TypeScript", "TypeScriptReact",
"Verilog", "VimL", "Zig", "gnuplot", "log", "requirements.txt", "Highlight
non-printables", "Private Key", "varlink"
Later commits will improve startup time for more code paths.
* fix some typos and misspellings
* CHANGELOG.md: Add Performance section (preliminary)
* Add a CHANGELOG.md entry for this PR
2021-09-09 18:52:33 +00:00
## Other
- Add PowerShell completion, see #1826 (@rashil2000)
2021-12-29 20:43:03 +00:00
- Minimum supported Rust version (MSRV) bumped to 1.51, see #1994 (@mdibaiee)
2021-05-12 20:55:25 +00:00
## Syntaxes
2021-07-25 11:28:43 +00:00
- Groff, see #1685 (@scop)
2021-07-28 20:03:01 +00:00
- HTTP Requests and Responses, see #1748 (@keith-hall)
2021-08-05 18:20:33 +00:00
- LLVM, see #1777 (@ioncodes)
2021-08-06 07:00:07 +00:00
- Highlight for `vimrc` and `gvimrc` files, see #1763 (@SuperSandro2000)
2021-08-11 20:03:33 +00:00
- Syslog highlighting improvements, see #1793 (@scop)
2021-06-19 12:42:07 +00:00
- Added support for `slim` syntax, see #1693 (@mfinelli)
2021-10-03 14:09:56 +00:00
- Racket, see #1884 (@jubnzv)
2021-10-23 09:27:59 +00:00
- LiveScript, see #1915 (@Enselic)
2021-10-31 02:33:40 +00:00
- MediaWiki, see #1925 (@sorairolake)
2021-11-28 11:41:38 +00:00
- The `requirements.txt` syntax has been removed due to incompatible license requirements.
2021-12-06 07:40:43 +00:00
- Dart, new highlighter, see #1959 (@Ersikan)
2021-12-12 17:58:30 +00:00
- SCSS and Sass syntaxes updated, see #1766 (@Enselic)
2021-12-12 18:41:04 +00:00
- PowerShell syntax updated, see #1935 (@Enselic)
2021-12-12 19:07:50 +00:00
- TypeScript syntax updated, see #1834 (@Enselic)
2021-05-12 20:55:25 +00:00
## `bat` as a library
2021-09-25 09:42:19 +00:00
- 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)
2021-12-11 13:00:45 +00:00
- 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)
2021-08-26 11:12:21 +00:00
- 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)
2022-01-02 20:46:15 +00:00
- 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)
2021-10-25 15:59:12 +00:00
2021-05-12 20:55:25 +00:00
2021-08-21 17:54:10 +00:00
# v0.18.3
## Bugfixes
- Bump `git2` dependency to fix build with Rust 1.54, see #1761
2021-07-12 20:07:23 +00:00
# v0.18.2
## Features
- Ignore known backup/template filename suffixes when selecting the syntax, see #1687 (@scop)
## Bugfixes
2021-07-13 08:56:51 +00:00
- Fix for a security vulnerability on Windows. Prior to this release, `bat` would execute programs called `less` /`less.exe` from the current working directory (instead of the one from `PATH` ) with priority. An attacker might be able to use this by placing a malicious program in a shared directory where the user would execute `bat` . `bat` users on Windows are advised to upgrade to this version. See #1724 and #1472 (@Ry0taK).
2021-07-12 20:07:23 +00:00
## Other
2021-07-13 08:56:51 +00:00
- Add bash completion, see #1678 (@scop)
2021-07-12 20:07:23 +00:00
- Fix Clippy lints, see #1661 (@mohamed-abdelnour)
- Add syntax highlighting test files, see #1213 and #1668 (@mohamed-abdelnour)
## Syntaxes
2021-07-13 08:56:51 +00:00
- Upgraded Julia syntax to fix a highlighting bug, see #1692
2021-07-12 20:07:23 +00:00
- Added support for `dash` syntax, see #1654 (@mohamed-abdelnour)
- Added support for `XAML` syntax, see #1590 and #1655 (@mohamed-abdelnour)
- Apply `DotENV` syntax also for `.env.default` and `.env.defaults` files, see #1669
2021-05-12 20:55:25 +00:00
# v0.18.1
2021-02-28 22:28:59 +00:00
## Bugfixes
2021-05-12 20:46:44 +00:00
- Mouse support and screen clearing broken for `less` versions with minor version number (581.2), see #1629 and #1639 (@aswild)
2021-02-28 22:28:59 +00:00
## Other
2021-03-02 08:15:49 +00:00
- `Input::ordinary_file` and `Input::with_name` now accept `Path` rather than `OsStr` see #1571 (@matklad)
2021-04-06 22:33:34 +00:00
- The `LESS` environment variable is now included in `bat --diagnostic` , see #1589 (@Enselic)
2021-03-07 14:08:39 +00:00
- Increased min. required Rust version to 1.45
2021-03-02 08:15:49 +00:00
2021-02-28 22:28:59 +00:00
## Syntaxes
2021-04-04 19:42:13 +00:00
- Improved the Syslog syntax highlighting, see #1606 (@keith-hall)
2021-03-28 19:35:01 +00:00
- Replaced "Advanced CSV" with a custom CSV syntax definition written especially for `bat` ; see #1574 (@keith-hall)
2021-05-12 20:46:44 +00:00
- Added SystemVerilog file syntax, see #1580 (@SeanMcLoughlin)
- Added Solidity and Vyper syntax, see #1602 (@Ersikan)
2021-04-04 19:42:13 +00:00
2021-02-28 22:28:59 +00:00
## New themes
2021-05-12 20:46:44 +00:00
- Dark+ VS Code theme, see #1588 and #1598 (@PatriotRossii)
2021-02-28 22:28:59 +00:00
# v0.18.0
2020-10-27 03:59:52 +00:00
2020-10-01 20:22:30 +00:00
## Features
2021-01-06 21:55:12 +00:00
2020-12-21 07:53:31 +00:00
- Use a pager when `bat --list-languages` is called, see #1394 (@stku1985)
2020-10-01 20:22:30 +00:00
2020-11-23 13:41:32 +00:00
## Bugfixes
2020-12-16 18:22:31 +00:00
- If the last line doesn't end with a newline character, don't add it if `--style=plain` , see #1438 (@Enselic)
2020-12-21 07:22:01 +00:00
- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
2020-12-21 07:16:49 +00:00
- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
2020-12-28 08:36:49 +00:00
- VimL syntax highlighting fix, see #1450 (@esensar)
2020-12-28 09:55:20 +00:00
- Print an 'Invalid syntax theme settings' error message if a custom theme is broken, see #614 (@Enselic)
2021-01-07 01:17:00 +00:00
- If plain mode is set and wrap is not explicitly opted in, long lines will no be truncated, see #1426
2020-12-30 12:25:23 +00:00
- If `PAGER` (but not `BAT_PAGER` or `--pager` ) is `more` or `most` , silently use `less` instead to ensure support for colors, see #1063 (@Enselic)
2021-01-10 16:34:15 +00:00
- If `PAGER` is `bat` , silently use `less` to prevent recursion. For `BAT_PAGER` or `--pager` , exit with error, see #1413 (@Enselic)
2021-01-11 22:12:42 +00:00
- Manpage highlighting fix, see #1511 (@keith-hall)
2021-02-27 11:21:06 +00:00
- `BAT_CONFIG_PATH` ignored by `bat` if non-existent, see #1550 (@sharkdp)
2020-11-27 05:47:46 +00:00
2020-11-23 13:41:32 +00:00
## Other
2020-12-21 08:42:06 +00:00
- Performance improvements, see #1421 (@LovecraftianHorror)
2021-01-06 21:55:12 +00:00
- Added a new `--diagnostic` option to collect information for bug reports, see #1459 (@sharkdp)
2021-02-28 09:06:56 +00:00
- Modified default theme colors to differentiate between a JSON key and a string value, see #1400 (@keith-hall)
2021-01-08 23:23:11 +00:00
- Upped min required Rust version to 1.42
2020-12-21 08:42:06 +00:00
2020-11-23 13:41:32 +00:00
## Syntaxes
2021-01-02 20:37:11 +00:00
- Added Zig syntax, see #1470 (@paulsmith)
2021-01-02 08:46:58 +00:00
- Added Lean syntax, see #1446 (@Julian)
2020-12-29 07:34:44 +00:00
- Added `.resource` extension for Robot Framework files, see #1386
2021-01-09 21:03:48 +00:00
- Added `gnuplot` syntax, see #1431 (@sharkdp)
2021-02-16 20:51:57 +00:00
- Highlight *.pac (Proxy auto-config) files as JavaScript, see #1515 (@sharkdp)
2020-12-29 07:34:44 +00:00
2020-11-23 13:41:32 +00:00
## New themes
2021-01-09 19:44:44 +00:00
- `ansi` replaces `ansi-dark` and `ansi-light` , see #1104 and #1412 (@mk12). **Breaking change:** users that were previously using one of the `ansi-*` themes should switch to `ansi` .
- The Gruvbox theme has been updated, see #1291 (@j0hnmeow). **Breaking change:** users that were previously using `gruvbox` or `gruvbox-white` should update and use `gruvbox-dark` /`gruvbox-light` instead.
2020-11-29 22:16:54 +00:00
2020-11-23 13:41:32 +00:00
## `bat` as a library
2021-01-10 20:49:38 +00:00
- The following `PrettyPrinter` methods have been removed (they were previously deprecated):
- `input_stdin_with_name`
- `input_from_bytes_with_name`
- `input_from_reader_with_name`
- `vcs_modification_markers` (if the `git` feature is not enabled)
2020-11-30 01:53:56 +00:00
2020-11-24 20:06:50 +00:00
# v0.17.1
## Bugfixes
- Running `bat` without arguments fails ("output file is also an input"), see #1396
2020-11-23 13:41:32 +00:00
2020-11-26 15:23:58 +00:00
2020-11-23 13:41:32 +00:00
# v0.17.0
## Features
2020-10-12 07:13:32 +00:00
- Added a new `--style` value, `rule` , which adds a simple horizontal ruled line between files, see #1276 (@tommilligan)
2020-11-23 13:41:32 +00:00
- Pass `-S` ("chop long lines") to `less` if `--wrap=never` is set in `bat` , see #1255 (@gahag)
2020-10-08 13:58:57 +00:00
2020-10-01 20:22:30 +00:00
## Bugfixes
2020-11-23 13:41:32 +00:00
- Detect infinite loop when input and output are the same, see #1193 and #1197 (@niklasmohrin)
- Throw an error when `bat` is being used as `pager` , see #1343 (@adrian-rivera)
2020-10-30 19:25:23 +00:00
- Bash syntax highlighting not selected for `*.ebuild` and `*.eclass` files, see #1292 (@sharkdp)
2020-11-06 20:25:27 +00:00
- Fix `zsh` completion when using `-p` , see #1320 (@xzfc)
2020-10-27 04:12:19 +00:00
2020-10-01 20:22:30 +00:00
## Other
2020-10-25 18:09:52 +00:00
- Add note to refer to see detailed help with `--help` (and vice versa with `-h` ), see #1215 (@henil)
2020-10-27 03:59:52 +00:00
- Add a `Contributors` section to `README` , see #1348 (@adrian-rivera)
2020-10-25 18:09:52 +00:00
2020-10-01 20:22:30 +00:00
## Syntaxes
2020-10-15 05:50:47 +00:00
- Manpage syntax highlighting has been improved, see #1315 (@keith-hall)
2020-10-29 18:33:09 +00:00
- Add Svelte file syntax, see #1285 (@kjmph)
2020-10-15 05:50:47 +00:00
2020-10-01 20:22:30 +00:00
## New themes
2020-10-24 17:21:06 +00:00
- Coldark, see #1329 (@armandphilippot)
2020-10-01 20:22:30 +00:00
# v0.16.0
2020-03-26 08:46:58 +00:00
2020-04-25 11:17:07 +00:00
## Features
2020-05-27 23:38:43 +00:00
- Added support for the `NO_COLOR` environment variable, see #1021 and #1031 (@eth-p)
2020-09-14 09:30:47 +00:00
- Added `-P` short flag to disable paging, see #1075 and #1082 (@LordFlashmeow)
- Added `--force-colorization` /`-f` flag to provide an alias for forced color and decoration output, see #1141 (@alexanderkarlis)
2020-05-27 23:38:43 +00:00
2020-05-25 15:27:27 +00:00
## Bugfixes
2020-06-20 15:00:32 +00:00
- Fixed non-printable characters display for redirected output, see #1061 (@gsomix)
2020-10-01 20:22:30 +00:00
- Handle file extension conflicts in `--list-languages` , see #1076 and #1135 (@Kienyew)
2020-06-20 15:00:32 +00:00
2020-05-25 15:27:27 +00:00
## Other
2020-09-20 19:52:49 +00:00
2020-07-07 06:06:26 +00:00
- Switched to "·" (U+00B7) Middle Dot from "•" (U+2022) Bullet for non-printing spaces, see #1056 and #1100 (@LordFlashmeow)
2020-09-14 09:30:47 +00:00
- Added zsh shell completion script, see #1136 (@Kienyew)
2020-09-20 19:52:49 +00:00
- Improved `--help` text (@sharkdp)
2020-10-01 11:27:53 +00:00
- Added custom languages/themes sections to manpage (@eth-p)
2020-07-07 06:06:26 +00:00
2020-05-29 20:14:20 +00:00
## Syntaxes
- Update AsciiDoc syntax, see #1034 (@rxt1077)
2020-06-23 01:19:48 +00:00
- GLSL (@caioalonso)
2020-08-16 20:24:06 +00:00
- Add Nginx and Apache config file syntax, see #1137 (@kjmph, @niklasmohrin )
2020-09-20 19:52:49 +00:00
- Use `fstab` syntax for `crypttab` files, see #1073 (@sharkdp)
2020-10-01 19:09:46 +00:00
- Support syntax highlighting for files in `$XDG_CONFIG_HOME/git/` , see #1191 (@ahmedelgabri)
2020-05-29 20:14:20 +00:00
2020-05-25 15:27:27 +00:00
## New themes
2020-06-23 01:00:35 +00:00
- Gruvbox, see #1069 (@kyleondy)
2020-07-19 20:49:10 +00:00
- base16-256 for [base16-shell ](https://github.com/chriskempson/base16-shell ) users, see #1111 (@mk12)
2020-06-23 01:00:35 +00:00
2020-05-25 15:27:27 +00:00
## `bat` as a library
2020-05-27 22:22:00 +00:00
- Add APIs to provide `Input` descriptions with `InputDescription` (@eth-p)
- Add function to directly provide `Input` s to `PrettyPrinter` (@eth-p)
2020-05-29 19:34:13 +00:00
- **Breaking:** `Input::theme_preview_file` is no longer available. (@eth-p)
2020-05-27 22:22:00 +00:00
2020-05-25 15:27:27 +00:00
## Packaging
2020-05-13 06:21:58 +00:00
2020-09-20 17:50:39 +00:00
- Removed build dependency on `liquid` (@sharkdp).
2020-05-27 10:04:31 +00:00
# v0.15.4
2020-05-13 06:21:58 +00:00
2020-04-25 11:17:07 +00:00
## Bugfixes
2020-05-13 06:21:58 +00:00
2020-05-27 08:14:32 +00:00
- Added missing Solarized themes, see #1027
- Fixed highlighting bug in Haskell source files, see #1026
# v0.15.3
## Bugfixes
2020-05-26 05:55:57 +00:00
- Cannot run `bat` with relative paths, see #1022
2020-05-13 06:21:58 +00:00
- bat mishighlights Users that start with digits in SSH config, see #984
2020-05-26 05:55:57 +00:00
## New syntaxes
- SML, see #1005 (@kopecs)
## Other
- Some syntaxes and themes have been updated to the latest version
# v0.15.2
## Bugfixes
2020-05-24 09:30:10 +00:00
- Fix syntax detection for files called 'rails', see #1008
2020-05-24 14:09:59 +00:00
- Fix potential errors with syntax detection for symlinked files, see #1001
2020-05-26 06:38:12 +00:00
- `--map-syntax` doesn't work with names provided through `--file-name` (@eth-p)
2020-05-13 06:21:58 +00:00
2020-05-11 18:22:50 +00:00
## Other
2020-05-16 09:42:29 +00:00
2020-05-25 15:27:27 +00:00
- Add padding above headers when not using a grid, see #968 and #981 (@pt2121)
2020-05-16 11:44:15 +00:00
- bat now prints an error if an invalid syntax is specified via `-l` or `--map-syntax` , see #1004 (@eth-p)
2020-05-16 09:42:29 +00:00
2020-05-24 14:19:07 +00:00
## `bat` as a library
2020-05-15 21:03:04 +00:00
2020-05-25 07:03:54 +00:00
- `PrettyPrinter::vcs_modification_markers` has been marked deprecated when building without the `git` feature, see #997 and #1020 (@eth-p, @sharkdp )
2020-05-11 18:22:50 +00:00
## Packaging
2020-05-24 08:01:53 +00:00
- Compilation problems with `onig_sys` on various platforms have been resolved by upgrading to `syntect 4.2` , which includes a new `onig` version that allows to build `onig_sys` without the `bindgen` dependency. This removes the need for `libclang(-dev)` to be installed to compile `bat` . Package maintainers might want to remove `clang` as a build dependency. See #650 for more details.
2020-05-11 18:22:50 +00:00
# v0.15.1
2020-05-11 17:33:13 +00:00
2020-05-11 18:22:50 +00:00
## Bugfixes
- Fix highlighting of Markdown files, see #963 and #977
2020-05-11 17:33:13 +00:00
- Fix `base16` theme (was broken since in v0.14), see #972 , #934 and #979 (@mk12).
Users suffering from #865 ("no color for bat in ssh from a Windows client") can use the `ansi-dark` and `ansi-light` themes from now on.
2020-04-25 11:17:07 +00:00
## New syntaxes
2020-04-27 20:01:41 +00:00
- Fortran, see #957
2020-04-29 09:28:12 +00:00
- Email (@mariozaizar)
2020-04-29 18:57:55 +00:00
- QML, see #962 (@pylipp)
2020-04-27 20:01:41 +00:00
2020-04-25 11:17:07 +00:00
# v0.15.0
2020-04-21 16:21:12 +00:00
## Features
2020-04-23 21:39:30 +00:00
2020-04-24 14:06:59 +00:00
- Add a new `--diff` /`-d` option that can be used to only show lines surrounding
2020-04-23 21:39:30 +00:00
Git changes, i.e. added, removed or modified lines. The amount of additional
context can be controlled with `--diff-context=N` . See #23 and #940
2020-04-21 16:21:12 +00:00
## Bugfixes
2020-04-25 11:17:07 +00:00
- Error message printed in the middle of the output for another file, see #946
2020-04-25 13:19:42 +00:00
- Performance improvements when using custom caches (via `bat cache --build` ): the `bat` startup time should now be twice as fast (@lzutao).
2020-04-25 11:17:07 +00:00
## Themes
- Updated version of the Solarized dark/light themes, see #941
## `bat` as a library
2020-04-21 16:21:12 +00:00
2020-04-25 11:17:07 +00:00
- There are a few changes in the "low level" API (the `Config` struct has changed and
the error handler needs a new `&mut dyn Write` argument). The high-level API is not
affected.
2020-04-21 16:21:12 +00:00
# v0.14.0
2020-03-26 08:54:36 +00:00
## Features
- Added a new `--file-name <name>…` option to overwrite the displayed filename(s)
2020-04-21 06:58:38 +00:00
in the header. This is useful when piping input into `bat` . See #654 and #892 (@neuronull).
2020-04-21 15:49:36 +00:00
- Added a new `--generate-config-file` option to create an initial configuration file
2020-03-26 08:54:36 +00:00
at the right place. See #870 (@jmick414)
## Bugfixes
2020-04-11 20:52:34 +00:00
- Performance problems with C# source code have been fixed, see #677 (@keith-hall)
2020-04-13 08:36:28 +00:00
- Performance problems with Makefiles have been fixed, see #750 (@keith-hall)
2020-04-22 18:53:53 +00:00
- Fix bug when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall)
2020-04-21 08:11:12 +00:00
- A highlighting problem with Rust source code has been fixed, see #924 (@keith-hall)
2020-04-21 16:21:12 +00:00
- Windows: short files that do not require paging are displayed and then lost, see #887
2020-04-22 18:53:53 +00:00
- `--highlight-line` did not work correctly in combination with `--tabs=0` and `--wrap=never` ,
see #937
2020-04-11 20:52:34 +00:00
2020-03-26 08:54:36 +00:00
## Other
2020-04-21 13:50:46 +00:00
- When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
`metadata.yaml` file which includes information about the `bat` version which was
used to create the cached files. When loading cached files, we now print an error
if they have been created with an incompatible version. See #882
2020-03-26 08:54:36 +00:00
- Updated `liquid` dependency to 0.20, see #880 (@ignatenkobrain)
2020-03-31 07:33:58 +00:00
## `bat` as a library
2020-04-22 21:56:20 +00:00
- A completely new "high level" API has been added that is much more convenient
to use. See the `examples` folder for the updated code. The older "low level"
API is still available (basically everything that is not in the root `bat`
module), but has been refactored quite a bit. It is recommended to only use
the new "high level" API, if possible. This will be much easier to keep stable.
Note that this should still be considered a "beta" release of `bat` -as-a-library.
For more details and some screenshots of the example programs, see #936 .
2020-03-31 07:33:58 +00:00
- Stripped out a lot of binary-only dependencies, see #895 and #899 (@dtolnay)
This introduces a `features = ["application"]` which is enabled by default and pulls in
everything required by `bat` the application. When depending on bat as a library, downstream
`Cargo.toml` should disable this feature to cut out inapplicable heavy dependencies:
``` toml
[dependencies]
2020-04-21 16:21:12 +00:00
bat = { version = "0.14", default-features = false }
2020-03-31 07:33:58 +00:00
```
Other optional functionality has also been put behind features: `paging` and `git` support.
- Allow using the library with older syntect, see #896 and #898 (@dtolnay)
2020-03-26 08:54:36 +00:00
## New syntaxes
2020-03-27 06:33:56 +00:00
- Rego, see #872 (@patrick-east)
2020-04-12 17:42:36 +00:00
- Stylo, see #917
2020-03-27 06:33:56 +00:00
2020-03-26 08:54:36 +00:00
2020-03-26 08:46:58 +00:00
# v0.13.0
## `bat` as a library
Beginning with this release, `bat` can be used as a library (#423).
This was a huge effort and I want to thank all people who made this possible: @DrSensor , @mitsuhiko , @mre , @eth -p!
- Initial attempt in #469 (@mitsuhiko)
- Second attempt, complete restructuring of the `bat` crate, see #679 (@DrSensor)
- Updates to example, public API, error handling, further refactoring: #693 #873 #875 (@sharkdp)
I want to stress that this is the very first release of the library. Things are very likely to change. A lot of things are still missing (including the documentation).
That being said, you can start using it! See the example programs in [`examples/` ](https://github.com/sharkdp/bat/tree/master/examples ).
You can see the API documentation here: https://docs.rs/bat/
## Features
- (**Breaking change**) Glob-based syntax mapping, see #877 and #592 . With this change,
users need to update their bat config files (`bat --config-file`), if they have any `--map-syntax` settings
present.
The option now works like this:
```bash
--map-syntax < glob-pattern > :< syntax-name >
```
For more information, see the `--help` text, the man page or the README.
This new feature allows us to properly highlight files like:
* `/etc/profile`
* `~/.ssh/config`
- `--highlight-line` now accepts line ranges, see #809 (@lkalir)
- Proper wrapping support for output with wide Unicode characters, see #811 #787 and #815 (@Kogia-sima)
- A lot of updates to existing syntaxes via #644 (@benwaffle, @keith -hall)
- `BAT_CACHE_PATH` can be used to place cached `bat` assets in a non-standard path, see #829 (@neuronull)
- Support combination of multiple styles at the same time, see #857 (@aslpavel)
## Bugfixes
- Do not pass '--no-init' on newer less versions, see #749 and #786 (@sharkdp)
- 'bat cache' still takes precedence over existing files, see #666 (@sharkdp)
- `.sc` files should be treated as scala files, see #443 (@benwaffle)
- Allow underscores and dashes in page names, see #670 (@LunarLambda)
- Keep empty lines empty, see #601 (@mbarbar)
- Wrapping does not work when piping, see #758 (@fusillicode, @allevo , @gildo )
- Allow for non-unicode filenames, see #225 (@sharkdp)
- Empty file without header produces incomplete grid, see #798 (@eth-p)
- Files named `build` don't respect shebang lines, see #685 (@sharkdp)
## Other
- Parametrizable names for man page and shell completion files, see #659 #673 #656 (@eth-p)
- Enabled LTO, making `bat` about 10% faster, see #719 (@bolinfest, @sharkdp )
- Suggestions non how to configure `bat` for MacOS dark mode, see README (@jerguslejko)
- Extended ["Integration with other tools" ](https://github.com/sharkdp/bat#integration-with-other-tools ) section (@eth-p)
- Updated [instrutions on how to use `bat` as a `man`-pager ](https://github.com/sharkdp/bat#man ), see #652 , see #667 (@sharkdp)
- Add section concerning file encodings, see #688 and #568 (@sharkdp)
- Updated sort order of command-line options in `--help` text and manpage, see #653 and #700 (@hrlmartins)
- Updates to the man page syntax, see #718 (@sharkdp)
- Japanese documentation updates, see #863 (@k-ta-yamada, @sorairolake and @wt -l00)
- Accept "default" as a theme, see #757 (@fvictorio)
- Updated Windows installation instructions, see #852 (@sorenbug)
- Updated man page, see #573 (@sharkdp)
## New syntaxes
- Jinja2, see #648 (@Martin819)
- SaltStack SLS, see #658 (@Martin819)
- `/etc/fstab` , see #696 (@flopp and @eth -p)
- `/etc/group` and `/etc/passwd` , see #698 (@argentite)
- `/proc/cpuinfo` and `/proc/meminfo` , see #593 (@sharkdp)
- Nim, see #542 (@sharkdp)
- Vue, see #826 (@chaaaaarlotte)
- CoffeScript, see #833 (@sharkdp)
## New themes
- Dracula, see #687 (@clarfon)
- Nord, see #760 (@crabique)
- Solarized light and dark, see #768 (@hakamadare)
## Packaging
- `bat` is now in the official Ubuntu and Debian repositories, see #323 and #705 (@MarcoFalke)
- `bat` can now be installed via MacPorts, see #675 (@bn3t)
- Install fish completions into 'vendor_completions.d', see #651 (@sharkdp)
## Thanks
- To @eth -p for joining me as a maintainer! I'm very grateful for all the work you put into
managing and responding to issues, improving our deployment, adding PR/issue templates (#837) as
well as fixing bugs and implementing new features.
# v0.12.1
## Bugfixes
- Fixes a bug for older Windows versions (*"The procedure entry point `CreateFile2` could not be located"*), see #643 (@rivy)
# v0.12.0
## Features
- Binary file content can now be viewed with `bat -A` , see #623 , #640 (@pjsier and @sharkdp )
- `bat` can now be used as a man pager. Take a look at the README and #523 for more details.
- Add new style component to separate multiple `--line-range` s, see #570 (@eth-p)
- Added `-L` as an alias for `--list-languages`
## Bugfixes
- Output looks unbalanced when using '--style=grid,numbers' without 'header', see #571 (@eth-p)
- issues with filenames starting with "cache", see #584
- Can't build cache with new theme without creating cache dir, see #576 (@frm)
- `--terminal-width -10` is parsed incorrectly, see #611
## Other
- Added fish completions to DEB package, see #554
## New syntaxes
- Emacs Org mode, see #36 (@bricewge)
- `requirements.txt`
- DotENV `.env`
- SSH config syntax (`-l ssh_config`), see #582 (@issmirnov)
- `/etc/hosts` , see #583 (@issmirnov)
- GraphQL, see #625 (@dandavison)
- Verilog, see #616
- SCSS and Sass, see #637
- `strace` syntax, see #599
## Packaging
- `bat` is now in the official Gentoo repositories, see #588 (@toku-sa-n)
- `bat` is now in the official Alpine Linux repositories, see #586 (@5paceToast)
- `bat` is in the official Fedora repositories, see #610 (@ignatenkobrain)
# v0.11.0
## Features
- Three new special color themes are available: `ansi-light` , `ansi-dark` and `base16` . These
are useful for people that often switch from dark to light themes in their terminal emulator
or for people that want the colors to match their terminal theme colors. For more details,
see #543 and #490 (@mk12, implementation idea by @trishume )
- Hand-written auto completion script for Fish shell, see #524 and #555 (@ev-dev and @eth -p)
- The `-p` /`--plain` option can now be used twice (typically `-pp` ). The first `-p` switches the
`--style` to "plain". The second `-p` disables the pager. See #560 and #552 (@eth-p)
## Bugfixes
- Do not replace arguments to `less` when using `--pager` , see #509
- Binary files will now be indicated by a warning in interactive mode, see #530 #466 #550 (@maxfilov)
- Empty files are (once again) printed with a single header line, see #504 and #566 (@reidwagner
and @sharkdp )
- `--terminal-width=0` is now disallowed, see #559 (@eth-p)
- Accidental printing of files named `cache` , see #557
## Other
- New integration tests, see #500 and #502 (@reidwagner and @sharkdp )
- New ["Integration with other tools" ](https://github.com/sharkdp/bat#integration-with-other-tools ) section in the README.
- Migrated to Rust 2018 (@expobrain)
## New syntaxes
- F# syntax has been updated, see #531 (@stroborobo)
- Fish shell, see #548 (@sanga)
## Packaging
- `bat` is now available on Chocolatey, see #541 (@rasmuskriest)
# v0.10.0
## Features
- Added new `--highlight-line <N>` option, see #453 , #346 and #175 (@tskinn and @sharkdp )
## Changes
- **Change the default configuration directory on macOS** to `~/.config/bat` , see #442 (@lavifb). If you are on macOS, you need to copy your configuration directory from the previous place (`~/Library/Preferences/bat`) to the new place (`~/.config/bat`).
- Completely disabled the generation of shell completion files, see #372
- Properly set arguments to `less` if `PAGER` environment variable contains something like `less -F` (which is missing the `-R` option), see #430 (@majecty)
- Report the name of missing files, see #444 (@ufuji1984)
- Don't start pager if file doesn't exist, see #387
- Rename `bat cache --init` to `bat cache --build` , see #498
- Move the `--config-dir` and `--cache-dir` options from `bat cache` to `bat` and hide them from the help text.
## Bugfixes
- Blank line at the end of output when using `--style=plain` , see #379
- EOF must be sent twice on stdin if no other input is sent, see #477 (@reidwagner)
## New syntaxes
- Twig (@ahmedelgabri)
- `.desktop` files (@jleclanche)
- AsciiDoc (@markusthoemmes)
- Assembly (x86_64 and ARM)
- Log files (@caos21)
- Protobuf and ProtobufText (@caos21)
- Terraform (@caos21)
- Jsonnet (@hfm)
- Varlink (@haraldh)
## Other
- Added Japanese version of README (@sh-tech and @object1037 )
- Code improvements (@barskern)
# v0.9.0
## Features
- A new `-A` /`--show-all` option has been added to show and highlight non-printable characters (in analogy to GNU `cat` s option):
![](https://camo.githubusercontent.com/c3e769482ef3184f6be6adaa34bdc8d19c378254/68747470733a2f2f692e696d6775722e636f6d2f324b54486859542e706e67)
see #395 and #381 for more details.
- Added `--pager` option (to configure the pager from the configuration file), see #362 (@majecty)
- Added `BAT_CONFIG_PATH` environment variable to set a non-default path for `bat` s configuration file, see #375 (@deg4uss3r)
2021-06-13 19:32:08 +00:00
- Allow for multiple occurrences of `--style` to allow for the configuration
2020-03-26 08:46:58 +00:00
of styles from the config file, see #367 (@sindreij)
- Allow for multiple `--line-range` arguments, see #23
- The `--terminal-width` option can now also accept offsets, see #376
## Changes
- Use of italics is now *disabled by default* (see #389 for details). They can be
re-enabled by adding `--italic-text=always` to your configuration file.
- The default tab-width has been set to 4.
- Added new "Sublime Snazzy" theme.
- Shell completions are currently *not* shipped anymore, see #372 for details.
## Bugfixes
- Avoid endless recursion when `PAGER="bat"` , see #383 (@rodorgas)
## Other
- `bat` is now available on openSUSE, see #405 (@dmarcoux)
- Added section about the new configuration file in the README (@deg4uss3r)
- Chinese translation of README (@chinanf-boy)
- Re-written tests for `--tabs` (@choznerol)
- Speed up integration tests, see #394
# v0.8.0
## Features
- Support for a configuration file with the following simple format:
```bash
--tabs=4
--theme="Sublime Snazzy"
# A line-comment
--map-syntax .ignore:.gitignore
--map-syntax PKGBUILD:bash
--map-syntax Podfile:ruby
# Flags and options can also be on a single line:
--wrap=never --paging=never
```
The configuration file path can be accessed via `bat --config-file` . On Linux,
it is stored in `~/.config/bat/config` .
- Support for the `BAT_OPTS` environment variable with the same format as specified
above (in a single line). This takes precedence over the configuration file.
See also #310 .
- Support for custom syntax mappings via the `-m` /`--max-syntax` option.
This allows users to (re)map certain file extensions or file names to an existing syntax:
``` bash
bat --map-syntax .config:json ...
```
The option can be use multiple times. Note that you can easily make these mappings permanent by using bats new configuration file.
See #169
- Support pager command-line arguments in `PAGER` and `BAT_PAGER` , see #352 (@Foxboron)
- Add support for wildcards in Windows CMD, see #309 (@zxey)
- First-line syntax detection for all input types, see #205
- Encoding support for UTF-16LE and UTF-16BE, see #285
- New syntaxes: Robot framework (@sanga)
## Changes
- Binary files are now detected and not displayed when the output goes to an interactive terminal, see #205
## Bugfixes
- JavaDoc comments break syntax highlighting in .java files, see #81
- Bat Panics on Haskell Source Code, see #314
## Other
- Better `-h` and `--help` texts.
- Updated documentation on how to configure `bat` s pager
- Updated documentation for light backgrounds, see #328 (@russtaylor)
- Generate shell completions during build, see #115 (@davideGiovannini)
- A lot of new tests have been written
- `bat` is now available via [Termux ](https://termux.com/ ), see #341 (@fornwall)
- `bat` is now available via [nix ](https://nixos.org/nix ), see #344 (@mgttlinger)
- `bat` is now available via [Docker ](https://hub.docker.com/r/danlynn/bat/ ), see #331 (@danlynn)
# v0.7.1
## Features
- Use the `ansi_colours` package by @mina86 for better true-color approximation on 8 bit color terminals, see #319 and #202 .
## Bugfixes
- Bat Panics on Haskell Source Code, see #314
2020-04-29 09:28:12 +00:00
- Disable wrapping when `--style=plain` /`-p` is used, see #289
2020-03-26 08:46:58 +00:00
## Other
- Added Ansible install instructions (@aeimer)
- Added section about Cygwin to the README (@eth-p)
# v0.7.0
## Features
- Tabs are now (optionally) expanded to spaces. This can be controlled with the new
`--tabs` command-line option or the `BAT_TABS` environment variable. The
new feature also closes two bugs #166 and #184 . For more information, see #302 (@eth-p).
- Added support for the `BAT_STYLE` environment variable, see #208 (@ms2300)
- Added `OneHalf` theme for terminals with a light-gray background, see #256
- Added new syntaxes for CSV, JSX in JavaScript and TypeScript, Cabal, Dart,
F#, PureScript, Swift, Crystal, PowerShell (Many Thanks to @tobenna and @mimadrid )
## Changes
- Query `git diff` only when needed, see #303 (@ShikChen)
- Disable wrapping when `--plain` is used, see #289 (@eth-p)
## Bugfixes
- Can read files named `cache` , see #275 (@BK1603)
- A lot of bugfixes for Windows, see #252 , #264
- Detect `less` reliably and in a portable way, see #271 and #290 (@Aankhen)
- last decoration line is not formatted properly with `--wrap never` , see #299 (@Rogach)
- Do not show file header for directories, see #292
## Other
- Enabled a new `aarch64` build target, see #258 (@rachitchokshi)
- Provide Debian packages for `armhf` , see #280 (@rachitchokshi)
- Added README section about "`bat` on Windows" (@Aankhen)
- Windows installation via scoop (@meltinglava)
# v0.6.1
## Bugfixes
- Fixed panic when running `bat --list-languages | head` , see #232 (@mchlrhw)
2020-04-29 09:28:12 +00:00
- Respect `--color` settings for `--list-themes` and `--list-languages` , see #233
2020-03-26 08:46:58 +00:00
- Git modifications now work on Windows
## Other
- There will be auto-generated Windows releases, starting with this version (@anykao)
# v0.6.0
## Features
- The `--list-themes` option now shows a preview for each highlighting theme (@ms2300)
- Added `-p` /`--plain` as an alias for `--style=plain` , see #212 (@ms2300)
- Major refactorings, enabling some progress on #150 . In non-interactive mode, `bat` will now copy input bytes 1:1.
- New languages: Elm, Kotlin, Puppet, TypeScript, see #215 #216 #217 #218
- New syntax highlighting theme: zenburn (@colindean)
## Changes
- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
the default themes (they may also override), see #172
- The `Default.tmTheme` symlink is not necessary anymore.
## Bugfixes
* Using `bat cache --init` leads to duplicated syntaxes, see #206
## Other
* Extended and cleaned-up `--help` text.
2020-04-29 09:28:12 +00:00
* Added initial version of a man page, see #52
2020-03-26 08:46:58 +00:00
* New README sections: *Development* and *Troubleshooting* , see #220
# v0.5.0
## Features
- Added `--line-range n:m` option to print a range of lines, see #159 (@tskinn)
- The syntax highlighting theme can now be controlled by the `BAT_THEME` environment variable, see [README ](https://github.com/sharkdp/bat#highlighting-theme ) and #177 (@mandx)
- The `PAGER` and `BAT_PAGER` environment variables can be used to control the pager that `bat` uses, see #158 and the [new README section ](https://github.com/sharkdp/bat#using-a-different-pager )
- Added syntax highlighting for Nix, see #180
- Added syntax highlighting for AWK (Gert Hulselmans)
## Changes
2020-04-29 09:28:12 +00:00
- The customization of syntax sets and theme sets is now separated. Syntax definitions are now loaded *in addition* to the ones that are stored in the `bat` binary by default. Please refer to these new sections in the README: [Adding new syntaxes ](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions ), [Adding new themes ](https://github.com/sharkdp/bat#adding-new-themes ), also see #172
2020-03-26 08:46:58 +00:00
- The color for the filename is now the default foreground color. The colors for the grid and the line numbers is now determined from the syntax highlighting theme, which now also works for light backgrounds, see #178 .
## Bugfixes
- Escape Sequences get partially stripped, see #182 (@eth-p)
- Use separate Git repository for snapshot testing, see #165 and #161
2020-04-29 09:28:12 +00:00
- Markdown breaking on JavaScript, see #183
2020-03-26 08:46:58 +00:00
## Other
2020-04-29 09:28:12 +00:00
- Binaries for armv7 are now provided, see #196
2020-03-26 08:46:58 +00:00
- `bat` is now in the official [Arch package repositories ](https://www.archlinux.org/packages/community/x86_64/bat/ ).
- Optimizations in the RGB => 8-bit conversion (@mina86)
# v0.4.1
(this is just a small bugfix release, see 0.4.0 for all features and changes)
## Bugfixes
2020-04-29 09:28:12 +00:00
- Fix problem with `cargo test` when `bat` is not checked out in a Git repository, see #161
2020-03-26 08:46:58 +00:00
# v0.4.0
## Features
* Support for line-wrapping, see #54 and #102 (@eth-p)
* New and updated `--style` parameter, see #74 and README (@pitkley)
* Added `--theme` and `--list-themes` options, see #89 (@rleungx)
* Added syntax highlighting for: Julia (@iamed2), Dockerfiles, VimL, CMake, INI, Less
* Added a few popular Sublime Text highlighting themes, see #133
* Support for bold, italic and underline font styles, see #96
* Support for 32bit systems is now available, see #84
* Added `-u` and `-n` options, see #134
* ANSI color support on Windows 10
## Changes
* The customization folder for own syntaxes has been renamed from `syntax` to `syntaxes` , see README.
* Changed Markdown syntax to the default Sublime Text syntax, see #157
* Sorted language listing (@rleungx)
* Command line arguments like `--theme` or `--color` can now override themselves.
* Improved `--help` text.
## Bugfixes
- Fixed crash for (really) small terminal sizes, see #117 (@eth-p)
- Syntax detection for `.bashrc` , `CMakeLists.txt` etc., see #100
- Properly handle lines with invalid UTF-8, see #7 (@BrainMaestro)
- Better error handling, see #17 (@rleungx and @sharkdp )
- Proper handling of UTF-8 characters in `less` , see #98 (@ghuls)
- Build fix on nightly, see #148 (@tathanhdinh)
## Other
- [Comparison with alternative projects ](https://github.com/sharkdp/bat/blob/master/doc/alternatives.md ).
- New "bat" logo in the README, see #119 (@jraulhernandezi)
- Output test cases (@BrainMaestro)
- Lots of great refactoring work (@BrainMaestro)
# v0.3.0
## Features
* Automatic paging by integrating with `less` , see #29 (@BrainMaestro)
* Added support for reading from standard input, see #2
* Added support for writing to non-interactive terminals (pipes, files, ..); new
`--color=auto/always/never` option, see #26 (@BrainMaestro)
* Added `--list-languages` option to print all available syntaxes, see #69 (@connorkuehl)
* New option to specify the syntax via `-l` /`--language`, see #19 (@BrainMaestro)
* New option to control the output style (`--style`), see #5 (@nakulcg)
* Added syntax highlighting support for TOML files, see #37
## Changes
* The `init-cache` sub-command has been removed. The cache can now be controlled via
`bat cache` . See `bat cache -h` for all available commands.
## Bug fixes
* Get git repository from file path instead of current directory, see #22 (@nakulcg)
* Process substitution can now be used with bat (`bat < (echo a) < (echo b)`), see #80
## Thanks
I'd like to say a big THANK YOU to all contributors and everyone that has given us
some form of feedback.
Special thanks go to @BrainMaestro for his huge support with new features, bug reports
and code reviews!
# v0.2.3
- Added a new statically linked version of bat (`..-musl-..`)
# v0.2.2
- Remove openssl dependency completely, see #30 .
# v0.2.1
- Added Elixir syntax, see #25 .
- Use libcurl-openssl instead of libcurl-gnutls, see #30 .
# v0.2.0
- Support for custom syntaxes, add 'Markdown extended' theme
- Bugfix: Git modifications not shown from child folder
# v0.1.0
Initial release