1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-07-09 10:37:02 +02:00
This commit is contained in:
anarcat
2025-04-12 23:25:15 +02:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

@ -1,6 +1,7 @@
# unreleased # unreleased
## Features ## Features
* Add a `zbat` wrapper script to automatically decompress files before display, see PR #3177 (@anarcat)
- Add paging to `--list-themes`, see PR #3239 (@einfachIrgendwer0815) - Add paging to `--list-themes`, see PR #3239 (@einfachIrgendwer0815)

12
bin/zbat Executable file

@ -0,0 +1,12 @@
#!/bin/sh
set -e
set -u
# shellcheck disable=SC3040
(set -o pipefail 2> /dev/null) && set -o pipefail
cpath="$1"
# cpath without suffix
path="$(echo $cpath | sed 's/\.[^.]*$//')"
( bsdcat "$path" || gunzip -c "$path" ) | batcat --file-name "$path"