zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@berkom.de>
To: zsh-workers@sunsite.dk
Subject: Re: Test failures in artih and arguments
Date: Mon, 25 Feb 2002 10:14:24 +0100	[thread overview]
Message-ID: <15482.112.603822.543685@wischnow.berkom.de> (raw)
In-Reply-To: <1020130173726.ZM12752@candle.brasslantern.com>


Bart Schaefer wrote:

> [ making `foo -<TAB>' 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


      reply	other threads:[~2002-02-25  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-23 14:51 Felix Rosencrantz
2002-01-23 16:17 ` Peter Stephenson
2002-01-25  8:58 ` Sven Wischnowsky
2002-01-27 19:20   ` Bart Schaefer
2002-01-30  8:53     ` Sven Wischnowsky
2002-01-30 17:37       ` Bart Schaefer
2002-02-25  9:14         ` Sven Wischnowsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15482.112.603822.543685@wischnow.berkom.de \
    --to=wischnow@berkom.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).