From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7697 invoked from network); 5 Apr 2001 12:01:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2001 12:01:55 -0000 Received: (qmail 2370 invoked by alias); 5 Apr 2001 12:01:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13908 Received: (qmail 2358 invoked from network); 5 Apr 2001 12:01:49 -0000 From: Sven Wischnowsky Date: Thu, 5 Apr 2001 14:01:46 +0200 (MET DST) Message-Id: <200104051201.OAA06306@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: PATCH: Re: plus and minus options in _arguments In-Reply-To: <20010405111911.49570.qmail@web9303.mail.yahoo.com> Oliver Kiddle wrote: > If I do, for example typeset -r all the options starting with a > plus are completed along with the options starting minus. It isn't > possible to specify them without first adding a space here so they > shouldn't be completed. The completions should be the same as after > typeset - (except for the lack of -r). Yes. Bye Sven Index: Completion/Base/Utility/_arguments =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v retrieving revision 1.2 diff -u -r1.2 _arguments --- Completion/Base/Utility/_arguments 2001/04/04 11:29:22 1.2 +++ Completion/Base/Utility/_arguments 2001/04/05 12:00:22 @@ -348,6 +348,8 @@ tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" ) + [[ "$PREFIX" = [-+]* ]] && tmp1=( "${(@M)tmp1:#${PREFIX[1]}*}" ) + [[ "$single" = next ]] && tmp1=( "${(@)tmp1:#[-+]${PREFIX[-1]}((#e)|:*)}" ) -- Sven Wischnowsky wischnow@informatik.hu-berlin.de