zsh-workers
 help / color / mirror / code / Atom feed
From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
To: zsh-workers@zsh.org
Cc: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Subject: [PATCH] libarchive tar can actually extract much more formats
Date: Fri, 24 Sep 2021 12:43:00 -0400	[thread overview]
Message-ID: <20210924164300.279257-1-alex_y_xu@yahoo.ca> (raw)
In-Reply-To: <20210924164300.279257-1-alex_y_xu.ref@yahoo.ca>

this is still not quite right, because e.g. cpio format initramfs rarely
uses .cpio extension, but as far as extension-based matching it is
probably as good as we can get.
---
 Completion/Unix/Type/_tar_archive | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Type/_tar_archive b/Completion/Unix/Type/_tar_archive
index 00555156b..bc49c4a3a 100644
--- a/Completion/Unix/Type/_tar_archive
+++ b/Completion/Unix/Type/_tar_archive
@@ -23,7 +23,7 @@ if [[ "$1" = *[urtx]* ]]; then
   elif [[ "$_cmd_variant[$service]" == gnu ]]; then
     _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|.zst|lzo|)|(tbz|tgz|txz|zip|tzst|tzo|taz|tbz2|tz2|tlz|tZ))(-.)'
+    _files "$expl[@]" -g '*.((tar|TAR|cpio)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst|lzo|)|(tbz|tgz|txz|tzst|tzo|taz|tbz2|tz2|tlz|tZ|7z|ar|iso|deb|cab|lha|mtree|rar|warc|xar|zip))(-.)'
   else
     _files "$expl[@]" -g '*.(tar|TAR)(-.)'
   fi
-- 
2.33.0



           reply	other threads:[~2021-09-26  7:24 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20210924164300.279257-1-alex_y_xu.ref@yahoo.ca>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210924164300.279257-1-alex_y_xu@yahoo.ca \
    --to=alex_y_xu@yahoo.ca \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).