zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: bzip2 support for _tar, more tar problems
Date: Thu, 16 Dec 1999 17:16:34 -0500	[thread overview]
Message-ID: <19991216171634.A2131@dman.com> (raw)

tar xvzCf /tmp archiv<TAB> will not complete to archive.tar.gz;
instead it attempts to untar /tmp in search of archive within.
There should probably be a sanity check first to avoid untarring
directories, and then _tar should recognize the -C and pass
-W /tmp to _files in _tar_archive.

tar --directory=/tmp xvzf archiv<TAB>, on the other hand,
will work, but it is merely doing a _path_files -W /tmp,
thus losing all the smarts it would have without the
--directory.  This should also be calling _tar_archive
which in turn should do a -W /tmp.

Unfortunately, _tar_archive is counting on $1 containing
the flags; I think _tar_archive should take these as
arguments.

Index: Completion/User/_tar_archive
===================================================================
RCS file: /cvs/zsh/zsh/Completion/User/_tar_archive,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _tar_archive
--- Completion/User/_tar_archive	1999/12/01 15:29:44	1.1.1.3
+++ Completion/User/_tar_archive	1999/12/16 22:12:50
@@ -16,6 +16,8 @@
 if [[ "$1" = *[tx]* ]]; then
   if [[ "$1" = *[zZ]* ]]; then
     _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|.tgz)'
+  elif [[ "$1" = *I* ]]; then
+    _files "$expl[@]" -g '*.(tar|TAR).bz2'
   else
     _files "$expl[@]" -g '*.(tar|TAR)'
   fi


             reply	other threads:[~1999-12-16 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-16 22:16 Clint Adams [this message]
1999-12-17  4:39 ` PATCH: some tar problems fixed Clint Adams

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=19991216171634.A2131@dman.com \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.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).