mirror of
https://github.com/sharkdp/bat.git
synced 2025-06-21 10:07:57 +02:00
Merge a9077f32ba868abcc77294bf47d39a9aa0d0a79f into debb66f8b0c7b7cbef7c57b5ffebbf0643bf6717
This commit is contained in:
commit
97af5e055a
@ -1,6 +1,7 @@
|
||||
# unreleased
|
||||
|
||||
## 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)
|
||||
|
||||
|
12
bin/zbat
Executable file
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"
|
Loading…
x
Reference in New Issue
Block a user