cargo bat 0.15.0
v0.15.0

latest releases: 0.24.0, 0.23.0, 0.22.1...
4 years ago

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.

Don't miss a new bat release

NewReleases is sending notifications on new releases.