Skip to content

v0.15.0

Compare
Choose a tag to compare
@sharkdp sharkdp released this 25 Apr 11:30

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.