From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19219 invoked by alias); 5 Dec 2009 06:04:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27456 Received: (qmail 22083 invoked from network); 5 Dec 2009 06:03:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (proxy.melb.primenet.com.au: domain at exherbo.org does not designate permitted sender hosts) From: Ingmar Vanhassel To: Zsh hackers list Cc: Ingmar Vanhassel Subject: [PATCH 1/2] Complete lzma tarballs, the extension used for the previous format of xz Date: Sat, 5 Dec 2009 07:03:36 +0100 Message-Id: <1259993016-24231-1-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.6.rc1.244.g34c92 In-Reply-To: <20091203052945.GA25221@scru.org> References: <20091203052945.GA25221@scru.org> Complete .tbz & .txz files too. --- Completion/Unix/Type/_tar_archive | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Here's an add-on patch that adds completion for .lzma, which xz can unpack too. It's the extension used by a previous, deprecated format. Add .tbz, .txz too while add it. The second line seemed to be missing a dot before 'xz', I added that also. diff --git a/Completion/Unix/Type/_tar_archive b/Completion/Unix/Type/_tar_archive index a39e841..28df776 100644 --- a/Completion/Unix/Type/_tar_archive +++ b/Completion/Unix/Type/_tar_archive @@ -19,9 +19,9 @@ if [[ "$1" = *[urtx]* ]]; then elif [[ "$1" = *[Ijy]* ]]; then _files "$expl[@]" -g '*.(tar|TAR).bz2(-.)' elif [[ "$1" = *J* ]]; then - _files "$expl[@]" -g '*.(tar|TAR).xz(-.)' + _files "$expl[@]" -g '*.(tar|TAR).(lzma|xz)(-.)' elif [[ "$_cmd_variant[$service]" == gnu ]]; then - _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|xz|)|tgz)(-.)' + _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)' else _files "$expl[@]" -g '*.(tar|TAR)(-.)' fi -- 1.6.6.rc1.244.g34c92