Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] libarchive tar can actually extract much more formats
- X-seq: zsh-workers 49444
- From: "Alex Xu (Hello71)" <alex_y_xu@xxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: "Alex Xu (Hello71)" <alex_y_xu@xxxxxxxx>
- Subject: [PATCH] libarchive tar can actually extract much more formats
- Date: Fri, 24 Sep 2021 12:43:00 -0400
- Archived-at: <https://zsh.org/workers/49444>
- List-id: <zsh-workers.zsh.org>
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author