Skip to content

Releases: sharkdp/bat

v0.18.1

13 May 08:08
3aea514
Compare
Choose a tag to compare

Bugfixes

  • Mouse support and screen clearing broken for less versions with minor version number (581.2), see #1629 and #1639 (@aswild)

Other

  • Input::ordinary_file and Input::with_name now accept Path rather than OsStr see #1571 (@matklad)
  • The LESS environment variable is now included in bat --diagnostic, see #1589 (@Enselic)
  • Increased min. required Rust version to 1.45

Syntaxes

  • Improved the Syslog syntax highlighting, see #1606 (@keith-hall)
  • Replaced "Advanced CSV" with a custom CSV syntax definition written especially for bat; see #1574 (@keith-hall)
  • Added SystemVerilog file syntax, see #1580 (@SeanMcLoughlin)
  • Added Solidity and Vyper syntax, see #1602 (@Ersikan)

New themes

v0.18.0

28 Feb 22:25
Compare
Choose a tag to compare

Features

  • Use a pager when bat --list-languages is called, see #1394 (@stku1985)

Bugfixes

  • If the last line doesn't end with a newline character, don't add it if --style=plain, see #1438 (@Enselic)
  • Only print themes hint in interactive mode (bat --list-themes), see #1439 (@rsteube)
  • Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
  • VimL syntax highlighting fix, see #1450 (@esensar)
  • Print an 'Invalid syntax theme settings' error message if a custom theme is broken, see #614 (@Enselic)
  • If plain mode is set and wrap is not explicitly opted in, long lines will no be truncated, see #1426
  • If PAGER (but not BAT_PAGER or --pager) is more or most, silently use less instead to ensure support for colors, see #1063 (@Enselic)
  • If PAGER is bat, silently use less to prevent recursion. For BAT_PAGER or --pager, exit with error, see #1413 (@Enselic)
  • Manpage highlighting fix, see #1511 (@keith-hall)
  • BAT_CONFIG_PATH ignored by bat if non-existent, see #1550 (@sharkdp)

Other

  • Performance improvements, see #1421 (@LovecraftianHorror)
  • Added a new --diagnostic option to collect information for bug reports, see #1459 (@sharkdp)
  • Modified default theme colors to differentiate between a JSON key and a string value, see #1400 (@keith-hall)
  • Upped min required Rust version to 1.42

Syntaxes

New themes

  • 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.

bat as a library

  • 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)

v0.17.1

24 Nov 20:42
Compare
Choose a tag to compare

Bugfixes

  • Running bat without arguments fails ("output file is also an input"), see #1396

v0.17.0

23 Nov 15:57
Compare
Choose a tag to compare

Features

  • Added a new --style value, rule, which adds a simple horizontal ruled line between files, see #1276 (@tommilligan)
  • Pass -S ("chop long lines") to less if --wrap=never is set in bat, see #1255 (@gahag)

Bugfixes

Other

  • Add note to refer to see detailed help with --help (and vice versa with -h), see #1215 (@henil)
  • Add a Contributors section to README, see #1348 (@adrian-rivera)

Syntaxes

New themes

v0.16.0

02 Oct 21:28
Compare
Choose a tag to compare

Features

Bugfixes

  • Fixed non-printable characters display for redirected output, see #1061 (@gsomix)
  • Handle file extension conflicts in --list-languages, see #1076 and #1135 (@Kienyew)

Other

  • Switched to "·" (U+00B7) Middle Dot from "•" (U+2022) Bullet for non-printing spaces, see #1056 and #1100 (@LordFlashmeow)
  • Added zsh shell completion script, see #1136 (@Kienyew)
  • Improved --help text (@sharkdp)
  • Added custom languages/themes sections to manpage (@eth-p)

Syntaxes

New themes

bat as a library

  • Add APIs to provide Input descriptions with InputDescription (@eth-p)
  • Add function to directly provide Inputs to PrettyPrinter (@eth-p)
  • Breaking: Input::theme_preview_file is no longer available. (@eth-p)

Packaging

  • Package maintainers: note that we now include zsh shell completion files
  • Removed build dependency on liquid (@sharkdp).

Thanks

Special thanks to @rivy for porting our CI/CD workflows to Github Actions. Also, many thanks to @Kienyew and @eth-p for major contributions!

v0.15.4

27 May 10:04
Compare
Choose a tag to compare

Bugfixes

  • Added missing Solarized themes, see #1027
  • Fixed highlighting bug in Haskell source files, see #1026

v0.15.3

26 May 06:27
Compare
Choose a tag to compare

Bugfixes

  • Cannot run bat with relative paths, see #1022
  • bat mishighlights Users that start with digits in SSH config, see #984

New syntaxes

Other

  • Some syntaxes and themes have been updated to the latest version

v0.15.2

25 May 15:30
Compare
Choose a tag to compare

Warning: this release suffers from #1022. bat will panic when called with a relative file path.

Bugfixes

  • --map-syntax doesn't work with names provided through --file-name (@eth-p)
  • Fix syntax detection for files called 'rails', see #1008
  • Fix potential errors with syntax detection for symlinked files, see #1001

Other

  • Add padding above headers when not using a grid, see #968 and #981 (@pt2121)
  • bat now prints an error if an invalid syntax is specified via -l or --map-syntax, see #1004 (@eth-p)

bat as a library

  • PrettyPrinter::vcs_modification_markers has been marked deprecated when building without the git feature, see #997 and #1020 (@eth-p, @sharkdp)

Packaging

  • 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.

v0.15.1

11 May 18:36
Compare
Choose a tag to compare

Bugfixes

  • Fix highlighting of Markdown files, see #963 and #977
  • 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.

New syntaxes

v0.15.0

25 Apr 11:30
Compare
Choose a tag to compare

Features

  • This release adds a new --diff/-d option that can be used to only show lines surrounding 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

    You can use a bash function like

    batdiff() {
        git diff --name-only --diff-filter=d 2>/dev/null | xargs bat --diff
    }

    to essentially get a version of git diff with syntax highlighting (but without being able to see the old version).

    image

Bugfixes

  • Error message printed in the middle of the output for another file, see #946
  • Performance improvements when using custom caches (via bat cache --build): the bat startup time should now be twice as fast (@lzutao).

Themes

  • Updated version of the Solarized dark/light themes, see #941

bat as a library

  • 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.