From: Frank Terbeck <frank.terbeck@rwth-aachen.de>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: _tar_archive completion with uncompressed archives && GNU tar
Date: Fri, 04 Aug 2006 13:27:05 +0200 [thread overview]
Message-ID: <20060804112705.GK30953@fsst.voodoo.lan> (raw)
Hello workers!
I experienced a problem with the completion of uncompressed tar
archives:
[snip]
zsh% autoload compinit && compinit
zsh% touch test.tar{,.gz,.bz2}
zsh% tar tvf test.tar.<TAB>
test.tar.bz2 test.tar.gz
[snap]
As you can see it doesn't complete 'test.tar'.
The _tar_archive function checks for $_cmd_variant to figure out if
the system uses the GNU version of tar and selects all compressed
archive files it finds, because GNU tar does some autosensing based on
the filename extension.
Anyway, I think that '.tar' files should be added as well.
This patch adds this behaviour:
--- _tar_archive.orig 2006-08-04 12:49:10.000000000 +0200
+++ _tar_archive 2006-08-04 12:47:48.000000000 +0200
@@ -19,7 +19,7 @@
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)(-.)'
+ _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|)|tgz)(-.)'
else
_files "$expl[@]" -g '*.(tar|TAR)(-.)'
fi
Regards, Frank
reply other threads:[~2006-08-04 11:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060804112705.GK30953@fsst.voodoo.lan \
--to=frank.terbeck@rwth-aachen.de \
--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).