about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-06-24 20:36:10 +0000
committerClint Adams <clint@users.sourceforge.net>2006-06-24 20:36:10 +0000
commit16db320811072c7b4d286e5b45dc938df2d7550a (patch)
tree7a8df9cab8fecb4ba56440093b445ca5bf51b65d
parentfdff42eaa70f115104d3e4269593ed553fa32659 (diff)
downloadzsh-16db320811072c7b4d286e5b45dc938df2d7550a.tar.gz
zsh-16db320811072c7b4d286e5b45dc938df2d7550a.tar.xz
zsh-16db320811072c7b4d286e5b45dc938df2d7550a.zip
22513: only do that for GNU tar >= 1.14.91.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_tar8
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c96ac8dfd..2ffac2261 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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#-}"