Skip to content

Releases: sharkdp/bat

v0.13.0

22 Mar 12:25
Compare
Choose a tag to compare

bat as a library

Beginning with this release, bat can be used as a library (#423).

This was a huge effort and I want to thank all people who made this possible: @DrSensor, @mitsuhiko, @mre, @eth-p!

I want to stress that this is the very first release of the library. Things are very likely to change. A lot of things are still missing (including the documentation).

That being said, you can start using it! See the example programs in examples/.

You can see the API documentation here: https://docs.rs/bat/

Features

  • (Breaking change) Glob-based syntax mapping, see #877 and #592. With this change,
    users need to update their bat config files (bat --config-file), if they have any --map-syntax settings
    present.

    The option now works like this:

    --map-syntax <glob-pattern>:<syntax-name>

    For more information, see the --help text, the man page or the README.

    This new feature allows us to properly highlight files like:

    • /etc/profile
    • ~/.ssh/config
  • --highlight-line now accepts line ranges, see #809 (@lkalir)

  • Proper wrapping support for output with wide Unicode characters, see #811 #787 and #815 (@Kogia-sima)

  • A lot of updates to existing syntaxes via #644 (@benwaffle, @keith-hall)

  • BAT_CACHE_PATH can be used to place cached bat assets in a non-standard path, see #829 (@neuronull)

  • Support combination of multiple styles at the same time, see #857 (@aslpavel)

Bugfixes

Other

New syntaxes

New themes

Packaging

  • bat is now in the official Ubuntu and Debian repositories, see #323 and #705 (@MarcoFalke)
  • bat can now be installed via MacPorts, see #675 (@bn3t)
  • Install fish completions into 'vendor_completions.d', see #651 (@sharkdp)

Thanks

  • To @eth-p for joining me as a maintainer! I'm very grateful for all the work you put into
    managing and responding to issues, improving our deployment, adding PR/issue templates (#837) as
    well as fixing bugs and implementing new features.

v0.12.1

03 Sep 06:13
Compare
Choose a tag to compare

Bugfixes

  • Fixes a bug for older Windows versions ("The procedure entry point CreateFile2 could not be located"), see #643 (@rivy)

v0.12.0

31 Aug 19:18
Compare
Choose a tag to compare

Features

  • Binary file content can now be viewed with bat -A, see #623, #640 (@pjsier and @sharkdp)
  • bat can now be used as a man pager. Take a look at the README and #523 for more details.
  • Add new style component to separate multiple --line-ranges, see #570 (@eth-p)
  • Added -L as an alias for --list-languages

Bugfixes

  • Output looks unbalanced when using '--style=grid,numbers' without 'header', see #571 (@eth-p)
  • issues with filenames starting with "cache", see #584
  • Can't build cache with new theme without creating cache dir, see #576 (@frm)
  • --terminal-width -10 is parsed incorrectly, see #611

Other

  • Added fish completions to DEB package, see #554

New syntaxes

Packaging

  • bat is now in the official Gentoo repositories, see #588 (@toku-sa-n)
  • bat is now in the official Alpine Linux repositories, see #586 (@5paceToast)
  • bat is in the official Fedora repositories, see #610 (@ignatenkobrain)

v0.11.0

15 May 21:25
Compare
Choose a tag to compare

Features

  • Three new special color themes are available: ansi-light, ansi-dark and base16. These
    are useful for people that often switch from dark to light themes in their terminal emulator
    or for people that want the colors to match their terminal theme colors. For more details,
    see #543 and #490 (@mk12, implementation idea by @trishume)
  • Hand-written auto completion script for Fish shell, see #524 and #555 (@ev-dev and @eth-p)
  • The -p/--plain option can now be used twice (typically -pp). The first -p switches the
    --style to "plain". The second -p disables the pager. See #560 and #552 (@eth-p)

Bugfixes

  • Do not replace arguments to less when using --pager, see #509
  • Binary files will now be indicated by a warning in interactive mode, see #530 #466 #550 (@maxfilov)
  • Empty files are (once again) printed with a single header line, see #504 and #566 (@reidwagner
    and @sharkdp)
  • --terminal-width=0 is now disallowed, see #559 (@eth-p)
  • Accidental printing of files named cache, see #557

Other

New syntaxes

Packaging

v0.10.0

07 Feb 22:50
Compare
Choose a tag to compare

Features

Changes

  • Change the default configuration directory on macOS to ~/.config/bat, see #442 (@lavifb). If you are on macOS, you need to copy your configuration directory from the previous place (~/Library/Preferences/bat) to the new place (~/.config/bat).
  • Completely disabled the generation of shell completion files, see #372
  • Properly set arguments to less if PAGER environment variable contains something like less -F (which is missing the -R option), see #430 (@majecty)
  • Report the name of missing files, see #444 (@ufuji1984)
  • Don't start pager if file doesn't exist, see #387
  • Rename bat cache --init to bat cache --build, see #498
  • Move the --config-dir and --cache-dir options from bat cache to bat and hide them from the help text.

Bugfixes

  • Blank line at the end of output when using --style=plain, see #379
  • EOF must be sent twice on stdin if no other input is sent, see #477 (@reidwagner)

New syntaxes

Other

v0.9.0

11 Nov 12:23
c073d4a
Compare
Choose a tag to compare

Features

  • A new -A/--show-all option has been added to show and highlight non-printable characters (in analogy to GNU cats option):

    see #395 and #381 for more details.

  • Added --pager option (to configure the pager from the configuration file), see #362 (@majecty)

  • Added BAT_CONFIG_PATH environment variable to set a non-default path for bats configuration file, see #375 (@deg4uss3r)

  • Allow for multiple occurences of --style to allow for the configuration
    of styles from the config file, see #367 (@sindreij)

  • Allow for multiple --line-range arguments, see #23

  • The --terminal-width option can now also accept offsets, see #376

Changes

  • Use of italics is now disabled by default (see #389 for details). They can be
    re-enabled by adding --italic-text=always to your configuration file.

  • The default tab-width has been set to 4.

  • Added new "Sublime Snazzy" theme.

  • Shell completions are currently not shipped anymore, see #372 for details.

Bugfixes

Other

  • bat is now available on openSUSE, see #405 (@dmarcoux)

  • Added section about the new configuration file in the README (@deg4uss3r)

  • Chinese translation of README (@chinanf-boy)

  • Re-written tests for --tabs (@choznerol)

  • Speed up integration tests, see #394

v0.8.0

17 Oct 22:04
Compare
Choose a tag to compare

Features

  • Support for a configuration file with the following simple format:

    --tabs=4
    --theme="Sublime Snazzy"
    
    # A line-comment
    --map-syntax .ignore:.gitignore
    --map-syntax PKGBUILD:bash
    --map-syntax Podfile:ruby
    
    # Flags and options can also be on a single line:
    --wrap=never --paging=never

    The configuration file path can be accessed via bat --config-file. On Linux,
    it is stored in ~/.config/bat/config.

  • Support for the BAT_OPTS environment variable with the same format as specified
    above (in a single line). This takes precedence over the configuration file.

    See also #310.

  • Support for custom syntax mappings via the -m/--max-syntax option.

    This allows users to (re)map certain file extensions or file names to an existing syntax:

    bat --map-syntax .config:json ...

    The option can be use multiple times. Note that you can easily make these mappings permanent by using bats new configuration file.

    See #169

  • Support pager command-line arguments in PAGER and BAT_PAGER, see #352 (@Foxboron)

  • Add support for wildcards in Windows CMD, see #309 (@Zxey)

  • First-line syntax detection for all input types, see #205

  • Encoding support for UTF-16LE and UTF-16BE, see #285

  • New syntaxes: Robot framework (@sanga)

Changes

  • Binary files are now detected and not displayed when the output goes to an interactive terminal, see #205

Bugfixes

  • JavaDoc comments break syntax highlighting in .java files, see #81

  • Bat Panics on Haskell Source Code, see #314

Other

v0.7.1

23 Sep 08:52
Compare
Choose a tag to compare

Features

  • Use the ansi_colours package by @mina86 for better true-color approximation on 8 bit color terminals, see #319 and #202.

Bugfixes

  • Bat Panics on Haskell Source Code, see #314
  • Disable wrapping when --style=plain/-p is used, see #289

Other

  • Added Ansible install instructions (@aeimer)
  • Added section about Cygwin to the README (@eth-p)

v0.7.0

12 Sep 20:34
Compare
Choose a tag to compare

Features

  • Tabs are now (optionally) expanded to spaces. This can be controlled with the new
    --tabs command-line option or the BAT_TABS environment variable. The
    new feature also closes two bugs #166 and #184. For more information, see #302 (@eth-p).

  • Added support for the BAT_STYLE environment variable, see #208 (@ms2300)

  • Added OneHalf theme for terminals with a light-gray background, see #256

  • Added new syntaxes for CSV, JSX in JavaScript and TypeScript, Cabal, Dart,
    F#, PureScript, Swift, Crystal, PowerShell (Many Thanks to @tobenna and @mimadrid)

Changes

Bugfixes

  • Can read files named cache, see #275 (@BK1603)

  • A lot of bugfixes for Windows, see #252, #264

  • Detect less reliably and in a portable way, see #271 and #290 (@Aankhen)

  • last decoration line is not formatted properly with --wrap never, see #299 (@Rogach)

  • Do not show file header for directories, see #292

Other

v0.6.1

31 Aug 22:36
Compare
Choose a tag to compare

Bugfixes

  • Fixed panic when running bat --list-languages | head, see #232 (@mchlrhw)
  • Respect --color settings for --list-themes and --list-languages, see #233
  • Git modifications now work on Windows

Other

  • There will be auto-generated Windows releases, starting with this version (@anykao)