aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2020-09-25 03:35:18 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-12-05 22:39:03 +0200
commit1890351f3423627ba5c4c495402f32d7e9ed90b7 (patch)
tree280cac1f708b29e57c8f9256879c47ca69660423 /src
parentCMake: Fix compatibility with CMake 3.13. (diff)
downloadxz-1890351f3423627ba5c4c495402f32d7e9ed90b7.tar.xz
Scripts: Add zstd support to xzgrep.
Thanks to Adam Borowski.
Diffstat (limited to '')
-rw-r--r--src/scripts/xzgrep.19
-rw-r--r--src/scripts/xzgrep.in1
2 files changed, 7 insertions, 3 deletions
diff --git a/src/scripts/xzgrep.1 b/src/scripts/xzgrep.1
index 2a515e49..3ac4fadb 100644
--- a/src/scripts/xzgrep.1
+++ b/src/scripts/xzgrep.1
@@ -6,7 +6,7 @@
.\"
.\" License: GNU GPLv2+
.\"
-.TH XZGREP 1 "2011-03-19" "Tukaani" "XZ Utils"
+.TH XZGREP 1 "2020-12-05" "Tukaani" "XZ Utils"
.SH NAME
xzgrep \- search compressed files for a regular expression
.SH SYNOPSIS
@@ -41,8 +41,9 @@ which may be either uncompressed or compressed with
.BR lzma (1),
.BR gzip (1),
.BR bzip2 (1),
+.BR lzop (1),
or
-.BR lzop (1).
+.BR zstd (1).
All options specified are passed directly to
.BR grep (1).
.PP
@@ -54,8 +55,9 @@ and fed to
When reading from standard input,
.BR gzip (1),
.BR bzip2 (1),
+.BR lzop (1),
and
-.BR lzop (1)
+.BR zstd (1)
compressed files are not supported.
.PP
If
@@ -94,4 +96,5 @@ or
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
+.BR zstd (1),
.BR zgrep (1)
diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in
index 9db5c3a8..28a777b3 100644
--- a/src/scripts/xzgrep.in
+++ b/src/scripts/xzgrep.in
@@ -159,6 +159,7 @@ for i; do
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdfq";;
*[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdfq";;
*[-.]lzo | *[-.]tzo) uncompress="lzop -cdfq";;
+ *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";;
*) uncompress="$xz -cdfq";;
esac
# Fail if xz or grep (or sed) fails.