From 16db320811072c7b4d286e5b45dc938df2d7550a Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sat, 24 Jun 2006 20:36:10 +0000 Subject: 22513: only do that for GNU tar >= 1.14.91. --- Completion/Unix/Command/_tar | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_tar') diff --git a/Completion/Unix/Command/_tar b/Completion/Unix/Command/_tar index b3a590d72..e8b400669 100644 --- a/Completion/Unix/Command/_tar +++ b/Completion/Unix/Command/_tar @@ -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#-}" -- cgit 1.4.1