1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-06 11:21:22 +02:00

22513: only do that for GNU tar >= 1.14.91.

This commit is contained in:
Clint Adams 2006-06-24 20:36:10 +00:00
parent fdff42eaa7
commit 16db320811
2 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2006-06-24 Clint Adams <clint@zsh.org>
* 22513: Completion/Unix/Command/_tar: only do that for
GNU tar >= 1.14.91.
* 22511: Completion/Unix/Command/_tar,
Completion/Unix/Type/_tar_archive: complete compressed archive
filenames for GNU tar even when a compression option is not

View file

@ -21,7 +21,13 @@ local _tar_cmd tf tmp tmpb del index
# from some of the possible long options, and from the second word if
# that does not start with a hyphen.
_pick_variant gnu=GNU unix --version
if _pick_variant gnu=GNU unix --version; then
case "$($service --version)" in
(tar \(GNU tar\) (#b)([0-9.-]##)*)
is_at_least 1.14.91 "$match[1]" || _cmd_variant[$service]="gnu-old"
;;
esac
fi
tmp=("${(@M)words:#-[^-]*}")
_tar_cmd="${(j::)tmp#-}"