Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test failures in artih and arguments
- X-seq: zsh-workers 16710
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Test failures in artih and arguments
- Date: Mon, 25 Feb 2002 10:14:24 +0100
- In-reply-to: <1020130173726.ZM12752@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020123145155.25539.qmail@xxxxxxxxxxxxxxxxxxxxxxx> <15441.7716.645376.366627@xxxxxxxxxxxxxxxxxx> <1020127192054.ZM9204@xxxxxxxxxxxxxxxxxxxxxxx> <15447.46235.229244.15033@xxxxxxxxxxxxxxxxxx> <1020130173726.ZM12752@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author