cargo bat 0.14.0
v0.14.0

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

Features

  • Added a new --file-name <name>… option to overwrite the displayed filename(s)
    in the header. This is useful when piping input into bat. See #654 and #892 (@neuronull).
  • Added a new --generate-config-file option to create an initial configuration file
    at the right place. See #870 (@jmick414)

Bugfixes

  • Performance problems with C# source code have been fixed, see #677 (@keith-hall)
  • Performance problems with Makefiles have been fixed, see #750 (@keith-hall)
  • Fix bug when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall)
  • A highlighting problem with Rust source code has been fixed, see #924 (@keith-hall)
  • Windows: short files that do not require paging are displayed and then lost, see #887
  • --highlight-line did not work correctly in combination with --tabs=0 and --wrap=never,
    see #937

Other

  • 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
  • Updated liquid dependency to 0.20, see #880 (@ignatenkobrain)

bat as a library

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

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

    [dependencies]
    bat = { version = "0.14", default-features = false, features = ["regex-onig"] }

    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)

New syntaxes

Thanks

Many thanks to @keith-hall for all the help with various Sublime syntax problems!

Don't miss a new bat release

NewReleases is sending notifications on new releases.