Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add zbat wrapper to decompress files automatically #3177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anarcat
Copy link

@anarcat anarcat commented Jan 14, 2025

This relies on bsdcat from archive-tools, which supports more formats than just gzip or, failing that, falls back to gunzip -c with a warning.

Previously[1], @sharkdp stated that bat would not support compressed files, but would be open in implementing a wrapper. There was another implementation proposed elsewhere[2], but it seems overengineered to me.

[1] #642 (comment)
[2] #237 (comment)

I don't know how to hook this up in the Rust build system, I'm sorry. It would also be nice to run shellcheck on this in CI, which I'm also unfamiliar with. It is, at least, currently shellcheck-clean. SC3040 is the pipefail stuff, and I don't go through the silly workaround they propose of doing a tempfile.

@anarcat anarcat mentioned this pull request Jan 14, 2025
This relies on bsdcat from archive-tools, which supports more formats
than just gzip or, failing that, falls back to gunzip -c with a
warning.

Previously[1], @sharkdp stated that bat would not support compressed
files, but would be open in implementing a wrapper. There was another
implementation proposed elsewhere[2], but it seems overengineered to
me.

[1] sharkdp#642 (comment)
[2] sharkdp#237 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant