From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17649 invoked from network); 5 Mar 1999 11:45:48 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Mar 1999 11:45:48 -0000 Received: (qmail 12422 invoked by alias); 5 Mar 1999 11:25:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5654 Received: (qmail 12408 invoked from network); 5 Mar 1999 11:25:11 -0000 Date: Fri, 5 Mar 1999 14:24:18 +0300 (MSK) From: Andrej Borsenkow X-Sender: bor@itsrm2.mowp.siemens.ru Reply-To: borsenkow.msk@sni.de To: Sven Wischnowsky cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: zsh-3.1.5-pws-10: _configure completion In-Reply-To: <199903051113.MAA03872@beta.informatik.hu-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 5 Mar 1999, Sven Wischnowsky wrote: > > Ugh. Couldn't we try to avoid using MIME for patches, please? Using my > self-written Emacs-based mail reader I never had problems with this > list and I really don't feel like starting up netscape or some such > horror just to get at a patch. > And I, using Outlook (not willingly) have to make sure, that patch is not mangled. Sigh ... Sven, really, MIME-disabled mailer now a days ... Sent with Pine /andrej --- Completion/User/_configure Thu Mar 4 19:27:03 1999 +++ /home/bor/.zsh.d/Completion/User/_configure Fri Mar 5 12:27:58 1999 @@ -1,5 +1,7 @@ #defcomp configure +setopt localoptions extendedglob + if [[ $PREFIX = *=* ]]; then # Complete filenames after e.g. --prefix= IPREFIX=${PREFIX%%=*}= @@ -7,6 +9,27 @@ compgen -f else # Generate a list of options from configure --help - compgen -s '$($words[1] --help | - sed -n -e '\''s/^ *\(--[-a-z0-9]*\)[ =,].*$/\1/p'\'')' + local -a pars + local i + pars=($($words[1] --help | awk '$1 ~ /--[a-z]*.*/ {print $1}')) + for i in $pars + do + case $i in + (--(((en|dis)able-FEATURE)|(with(out|)-PACKAGE))*) + : Skip standard help output + ;; + --enable) + : Skip standard help output + ;; + --*\[=* ) + compadd -M 'r:|-=* r:|=*' -q -S = -- ${i%%\[=*} + ;; + --*=* ) + compadd -M 'r:|-=* r:|=*' -S = -- ${i%%=*} + ;; + * ) + compadd -M 'r:|-=* r:|=*' -- $i + ;; + esac + done fi