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/_ls | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'Completion/Unix/Command/_ls') diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index b9588c5f4..33c3ca652 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -3,17 +3,6 @@ local arguments -(( $+_is_gnu )) || typeset -gA _is_gnu - -if (( ! $+_is_gnu[$words[1]] )); then - if [[ $(_call_program version $words[1] --help /dev/null) = *gnu* ]] - then - _is_gnu[$words[1]]=yes - else - _is_gnu[$words[1]]= - fi -fi - arguments=( '(--all -a -A --almost-all)'{--all,-a}'[list entries starting with .]' '(--almost-all -A -a --all)'{--almost-all,-A}'[list all except . and ..]' @@ -79,7 +68,7 @@ arguments=( ) # remove long options? -[[ -z "$_is_gnu[$words[1]]" ]] && +_pick_variant gnu=gnu unix --help || arguments=( ${${${arguments:#(|*\))--*}//--[^ )]#/}/\( #\)/} ) _arguments -s $arguments -- cgit v1.2.3-70-g09d2