Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Teach 'tar' to support more file types
- X-seq: zsh-workers 42574
- From: Eitan Adler <lists@xxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Teach 'tar' to support more file types
- Date: Sun, 1 Apr 2018 18:10:30 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to; bh=uG1AKxMPtMSq6YpgLi84Z+QOxrHjI4MBZ/aJz4BHEZs=; b=nusiIq/r9dR9XEJC053pIsBBVMwQ+HchrRqrEsS+vJlxvQiLUvtAIu+RqiIFJivJmH dKXXmYRdVTZnE1r4eb8FGZZZlNVWgr3AATpwGLDU2k7CrfOHCGIeF6tqmAeHHgUbgiPi oFr5W4JKwWdOO5vY/aal2s9r1xcSSGFxvjpMc=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
commit 61dba0a47a6a923a777c3a4c115af357ccf90396
Author: Eitan Adler <lists@xxxxxxxxxxxxxx>
Date: Sun Apr 1 18:06:56 2018 -0400
Teach 'tar' to support more file types
In libarchive based (BSD) tar implementations, all file types can be
uncompressed, even without a filetype letter. In GNU tar's case
"recent" versions (for over 10 years) can do the same.
As such, remove the check for tar type and just assume it works.
diff --git a/Completion/Unix/Type/_tar_archive
b/Completion/Unix/Type/_tar_archive
index 28df77638..8e8c45b12 100644
--- a/Completion/Unix/Type/_tar_archive
+++ b/Completion/Unix/Type/_tar_archive
@@ -20,10 +20,8 @@ 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 ]]; then
- _files "$expl[@]" -g
'*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)'
else
- _files "$expl[@]" -g '*.(tar|TAR)(-.)'
+ _files "$expl[@]" -g
'*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)'
fi
else
_files "$expl[@]"
--
Eitan Adler
Messages sorted by:
Reverse Date,
Date,
Thread,
Author