zsh-workers
 help / color / mirror / code / Atom feed
From: Eitan Adler <lists@eitanadler.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Teach 'tar' to support more file types
Date: Sun, 1 Apr 2018 18:10:30 -0400	[thread overview]
Message-ID: <CAF6rxg=4Uj3_KdWLwy2vWNvEk6vBr+3YtGrAjvAwQOCUN_H_=Q@mail.gmail.com> (raw)

commit 61dba0a47a6a923a777c3a4c115af357ccf90396
Author: Eitan Adler <lists@eitanadler.com>
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


             reply	other threads:[~2018-04-01 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-01 22:10 Eitan Adler [this message]
2018-04-05  3:55 ` Jun T
2018-04-05  5:41   ` Baptiste Daroussin
2018-04-06  6:53   ` Eitan Adler

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='CAF6rxg=4Uj3_KdWLwy2vWNvEk6vBr+3YtGrAjvAwQOCUN_H_=Q@mail.gmail.com' \
    --to=lists@eitanadler.com \
    --cc=zsh-workers@zsh.org \
    /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).