From 79323d6d41c91860cd05800a06cf8076df5051bd Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 15 Mar 2002 16:26:08 +0000 Subject: 16842: resolve name clash for nc between netcat and the nedit client for completion and add _pick_variant to resolve program variants in general --- Completion/Unix/Command/_grep | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'Completion/Unix/Command/_grep') diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep index 5dbbe025e..98b4256f8 100644 --- a/Completion/Unix/Command/_grep +++ b/Completion/Unix/Command/_grep @@ -16,17 +16,6 @@ else command="$words[1]" fi -(( $+_is_gnu )) || typeset -gA _is_gnu - -if (( ! $+_is_gnu[$command] )); then - if [[ $(_call_program version $command --help /dev/null) = *gnu* ]] - then - _is_gnu[$command]=yes - else - _is_gnu[$command]= - fi -fi - if [[ $service != [ef]grep ]]; then matchers='(--extended-regexp --fixed-strings --basic-regexp --perl-regexp -E -F -G -P)' arguments+=( @@ -77,7 +66,7 @@ arguments=( $arguments[@] ) # remove long options? -[[ -z "$_is_gnu[$command]" ]] && +_pick_variant -c "$command" gnu=gnu unix --help || arguments=( ${arguments:#(|*\)(\*|))--*} ) _arguments -s $arguments[@] -- cgit 1.4.1