zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] libarchive tar can actually extract much more formats
       [not found] <20210924164300.279257-1-alex_y_xu.ref@yahoo.ca>
@ 2021-09-24 16:43 ` Alex Xu (Hello71)
  0 siblings, 0 replies; only message in thread
From: Alex Xu (Hello71) @ 2021-09-24 16:43 UTC (permalink / raw)
  To: zsh-workers; +Cc: Alex Xu (Hello71)

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-26  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210924164300.279257-1-alex_y_xu.ref@yahoo.ca>
2021-09-24 16:43 ` [PATCH] libarchive tar can actually extract much more formats Alex Xu (Hello71)

Code repositories for project(s) associated with this 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).