From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: _tar (autodetection of compression by GNU tar >= 1.14.91)
Date: Sat, 24 Jun 2006 15:26:16 -0400 [thread overview]
Message-ID: <20060624192616.GA1430@scowler.net> (raw)
Since version 1.14.91, GNU tar has autodetected compressed
archives.
Index: Completion/Unix/Command/_tar
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_tar,v
retrieving revision 1.3
diff -u -r1.3 _tar
--- Completion/Unix/Command/_tar 27 Feb 2003 09:29:26 -0000 1.3
+++ Completion/Unix/Command/_tar 24 Jun 2006 19:24:54 -0000
@@ -21,6 +21,8 @@
# from some of the possible long options, and from the second word if
# that does not start with a hyphen.
+_pick_variant gnu=GNU unix --version
+
tmp=("${(@M)words:#-[^-]*}")
_tar_cmd="${(j::)tmp#-}"
Index: Completion/Unix/Type/_tar_archive
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_tar_archive,v
retrieving revision 1.3
diff -u -r1.3 _tar_archive
--- Completion/Unix/Type/_tar_archive 21 Jan 2004 13:53:29 -0000 1.3
+++ Completion/Unix/Type/_tar_archive 24 Jun 2006 19:24:54 -0000
@@ -18,6 +18,8 @@
_files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|tgz)(-.)'
elif [[ "$1" = *[Ijy]* ]]; then
_files "$expl[@]" -g '*.(tar|TAR).bz2(-.)'
+ elif [[ "$_cmd_variant[$service]" == gnu ]]; then
+ _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z|bz2)|tgz)(-.)'
else
_files "$expl[@]" -g '*.(tar|TAR)(-.)'
fi
next reply other threads:[~2006-06-24 19:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 19:26 Clint Adams [this message]
2006-06-24 19:49 ` Bart Schaefer
2006-06-24 20:14 ` Clint Adams
2006-06-25 4:24 ` Bart Schaefer
2006-06-26 14:28 ` Oliver Kiddle
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=20060624192616.GA1430@scowler.net \
--to=clint@zsh.org \
--cc=zsh-workers@sunsite.dk \
/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).