about summary refs log tree commit diff
path: root/Completion/Unix/Type
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2002-03-15 16:26:08 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2002-03-15 16:26:08 +0000
commit79323d6d41c91860cd05800a06cf8076df5051bd (patch)
tree0c08a2486422faa6f805589f2f60f640134b455b /Completion/Unix/Type
parent2fa33574f029358dc1597b1ff8700385d7c8332a (diff)
downloadzsh-79323d6d41c91860cd05800a06cf8076df5051bd.tar.gz
zsh-79323d6d41c91860cd05800a06cf8076df5051bd.tar.xz
zsh-79323d6d41c91860cd05800a06cf8076df5051bd.zip
16842: resolve name clash for nc between netcat and the nedit client for
completion and add _pick_variant to resolve program variants in general
Diffstat (limited to 'Completion/Unix/Type')
-rw-r--r--Completion/Unix/Type/_diff_options12
1 files changed, 1 insertions, 11 deletions
diff --git a/Completion/Unix/Type/_diff_options b/Completion/Unix/Type/_diff_options
index cc25a8ae8..7b16fb458 100644
--- a/Completion/Unix/Type/_diff_options
+++ b/Completion/Unix/Type/_diff_options
@@ -2,20 +2,10 @@
 
 local of ofwuc ouc oss ofwy ofwg ofwl cmd
 
-(( $+_is_gnu )) || typeset -gA _is_gnu
-
 cmd="$1"
 shift
 
-if (( ! $+_is_gnu[$cmd] )); then
-  if [[ $(_call_program version $cmd -v </dev/null 2>/dev/null) = *GNU* ]]; then
-    _is_gnu[$cmd]=yes
-  else
-    _is_gnu[$cmd]=
-  fi
-fi
-
-if [[ -n "$_is_gnu[$cmd]" ]]; then
+if _pick_variant -c $cmd gnu=GNU unix -v; then
   # output formats
   of="-y --side-by-side -n --rcs -e -f --ed -q --brief -c -C --context -u -U \
   --unified --old-group-format --new-group-format --changed-group-format \