about summary refs log tree commit diff
diff options
context:
space:
mode:
authornoraj <alexandre.zanni@hotmail.fr>2020-05-08 20:31:15 +0000
committerEitan Adler <lists@eitanadler.com>2020-05-09 18:59:03 -0700
commit494f6bcb3ca00626ac66348c572a9a69d8b0af37 (patch)
tree4e8c708864ea4c883116e12b638596d272a678fa
parentd9ad7e6b89b29cc43c6a0f672af2d6a904910858 (diff)
downloadzsh-494f6bcb3ca00626ac66348c572a9a69d8b0af37.tar.gz
zsh-494f6bcb3ca00626ac66348c572a9a69d8b0af37.tar.xz
zsh-494f6bcb3ca00626ac66348c572a9a69d8b0af37.zip
gitlab !13: tar supports zstandard (zstd)
Problem

Variants of tar based on libarchive or GNU tar can support extracting
zstd based files.

Solution

Add this type of to _tar_archive.

From noraj <gitlab@mg.gitlab.com>
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_tar_archive4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 190ca5bfb..2ec2e1653 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+2020-05-09: Eitan Adler <lists@eitanadler.com>
+
+	* noraj: gitlab !13: Completion/Unix/Type/_tar_archive: libarchive and
+	GNU tar can uncompress zstandard (zstd) based files
+
 2020-05-07: Eitan Adler <lists@eitanadler.com>
+
 	* unposted: Completion/Unix/Type/_tar_archive: libarchive based
 	tar can uncompress zip files
 
diff --git a/Completion/Unix/Type/_tar_archive b/Completion/Unix/Type/_tar_archive
index 32b25a46f..00555156b 100644
--- a/Completion/Unix/Type/_tar_archive
+++ b/Completion/Unix/Type/_tar_archive
@@ -21,9 +21,9 @@ if [[ "$1" = *[urtx]* ]]; then
   elif [[ "$1" = *J* ]]; then
     _files "$expl[@]" -g '*.(tar|TAR).(lzma|xz)(-.)'
   elif [[ "$_cmd_variant[$service]" == gnu ]]; then
-    _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)'
+    _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst|lzo|)|(tbz|tgz|txz|tzst|taz|taZ|tz2|tbz2|tlz))(-.)'
   elif [[ "$_cmd_variant[$service]" == libarchive ]]; then
-    _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz|zip))(-.)'
+    _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst|lzo|)|(tbz|tgz|txz|zip|tzst|tzo|taz|tbz2|tz2|tlz|tZ))(-.)'
   else
     _files "$expl[@]" -g '*.(tar|TAR)(-.)'
   fi