v0.15.0
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 #940You 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).
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
): thebat
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.