Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/2] Complete lzma tarballs, the extension used for the previous format of xz
- X-seq: zsh-workers 27456
- From: Ingmar Vanhassel <ingmar@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- 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
- Cc: Ingmar Vanhassel <ingmar@xxxxxxxxxxx>
- In-reply-to: <20091203052945.GA25221@xxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20091203052945.GA25221@xxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author