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. --- Completion/Unix/Type/_tar_archive | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Completion/Unix') 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