From d9ad7e6b89b29cc43c6a0f672af2d6a904910858 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Thu, 7 May 2020 19:55:12 -0700 Subject: unposted: libarchive tar can extract zip files Problem Variants of tar based on libarchive can extract zip files but `tar xf ` does not complete this type of file. Solution Add this type of to _tar_archive. --- ChangeLog | 4 ++++ Completion/Unix/Type/_tar_archive | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bddfae9c2..190ca5bfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2020-05-07: Eitan Adler + * unposted: Completion/Unix/Type/_tar_archive: libarchive based + tar can uncompress zip files + 2020-05-07 Daniel Shahaf * unposted: Completion/Debian/Command/_dscverify, diff --git a/Completion/Unix/Type/_tar_archive b/Completion/Unix/Type/_tar_archive index e8ddb1e59..32b25a46f 100644 --- a/Completion/Unix/Type/_tar_archive +++ b/Completion/Unix/Type/_tar_archive @@ -20,8 +20,10 @@ if [[ "$1" = *[urtx]* ]]; then _files "$expl[@]" -g '*.(tar|TAR).bz2(-.)' elif [[ "$1" = *J* ]]; then _files "$expl[@]" -g '*.(tar|TAR).(lzma|xz)(-.)' - elif [[ "$_cmd_variant[$service]" == (gnu|libarchive) ]]; then + elif [[ "$_cmd_variant[$service]" == gnu ]]; then _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)' + elif [[ "$_cmd_variant[$service]" == libarchive ]]; then + _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz|zip))(-.)' else _files "$expl[@]" -g '*.(tar|TAR)(-.)' fi -- cgit 1.4.1