From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23456 invoked from network); 30 Mar 2001 08:23:21 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Mar 2001 08:23:21 -0000 Received: (qmail 14450 invoked by alias); 30 Mar 2001 08:23:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13849 Received: (qmail 14434 invoked from network); 30 Mar 2001 08:23:14 -0000 Date: Fri, 30 Mar 2001 10:23:15 +0200 (MET DST) Message-Id: <200103300823.KAA22448@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: Sven Wischnowsky's message of Fri, 30 Mar 2001 10:21:08 +0200 (MET DST) Subject: Re: Two missing completion functions that bug me I wrote: > ... > > You could try the patch below ... Ahem. Bye Sven Index: Completion/Base/_arguments =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v retrieving revision 1.34 diff -u -r1.34 _arguments --- Completion/Base/_arguments 2001/03/28 09:50:38 1.34 +++ Completion/Base/_arguments 2001/03/30 08:22:57 @@ -335,14 +335,16 @@ if [[ "$single" = direct ]]; then _all_labels options expl option \ compadd -QS '' - "${PREFIX}${SUFFIX}" - elif [[ "$single" = next ]]; then - _all_labels options expl option \ - compadd -Q - "${PREFIX}${SUFFIX}" elif [[ "$single" = equal ]]; then _all_labels options expl option \ compadd -QqS= - "${PREFIX}${SUFFIX}" else + tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" ) + + [[ "$single" = next ]] && + tmp1=( "${(@)tmp1:#[-+]${PREFIX[-1]}((#e)|:*)}" ) + [[ "$PREFIX" != --* ]] && tmp1=( "${(@)tmp1:#--*}" ) tmp3=( "${(M@)tmp1:#[-+]?[^:]*}" ) tmp1=( "${(M@)tmp1:#[-+]?(|:*)}" ) @@ -351,6 +353,11 @@ _describe -o option \ tmp1 tmp2 -Q -S '' -- \ tmp3 -Q + + [[ "$single" = next && nm -eq $compstate[nmatches] ]] && + _all_labels options expl option \ + compadd -Q - "${PREFIX}${SUFFIX}" + fi single=yes else -- Sven Wischnowsky wischnow@informatik.hu-berlin.de