1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

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>
This commit is contained in:
noraj 2020-05-08 20:31:15 +00:00 committed by Eitan Adler
parent d9ad7e6b89
commit 494f6bcb3c
2 changed files with 8 additions and 2 deletions

View file

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

View file

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