Merge a9077f32ba868abcc77294bf47d39a9aa0d0a79f into debb66f8b0c7b7cbef7c57b5ffebbf0643bf6717

This commit is contained in:
anarcat 2025-04-12 23:25:15 +02:00 committed by GitHub
commit 97af5e055a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -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
View 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"