From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12012 invoked from network); 25 Feb 2002 09:15:23 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Feb 2002 09:15:23 -0000 Received: (qmail 4404 invoked by alias); 25 Feb 2002 09:15:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16710 Received: (qmail 4391 invoked from network); 25 Feb 2002 09:15:18 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15482.112.603822.543685@wischnow.berkom.de> Date: Mon, 25 Feb 2002 10:14:24 +0100 To: zsh-workers@sunsite.dk Subject: Re: Test failures in artih and arguments In-Reply-To: <1020130173726.ZM12752@candle.brasslantern.com> References: <20020123145155.25539.qmail@web10408.mail.yahoo.com> <15441.7716.645376.366627@wischnow.berkom.de> <1020127192054.ZM9204@candle.brasslantern.com> <15447.46235.229244.15033@wischnow.berkom.de> <1020130173726.ZM12752@candle.brasslantern.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Bart Schaefer wrote: > [ making `foo -' with `_arguments -x :arg:' not complete the > option ] Here's a simple patch which seems to work for me. It uses $compstate to keep the code from inserting matches and also handles faked matches. At least it should be good enough as a first implementation. Bye Sven Index: Completion/Base/Core/_message =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Core/_message,v retrieving revision 1.4 diff -u -r1.4 _message --- Completion/Base/Core/_message 25 Feb 2002 09:09:35 -0000 1.4 +++ Completion/Base/Core/_message 25 Feb 2002 09:11:10 -0000 @@ -18,6 +18,8 @@ ret=0 done + (( $compstate[nmatches] )) || compstate[insert]= + return ret fi Index: Test/Y03arguments.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/Y03arguments.ztst,v retrieving revision 1.4 diff -u -r1.4 Y03arguments.ztst --- Test/Y03arguments.ztst 22 Aug 2001 15:59:27 -0000 1.4 +++ Test/Y03arguments.ztst 25 Feb 2002 09:11:10 -0000 @@ -91,7 +91,7 @@ comptest $'tst -\t' 0:argument beginning with minus >line: {tst -}{} ->MESSAGE:{arg} +>DESCRIPTION:{arg} >DESCRIPTION:{option} >NO:{-x} -- Sven Wischnowsky wischnow@berkom.de