Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: _arguments -+o
- X-seq: zsh-workers 10782
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: _arguments -+o
- Date: Mon, 17 Apr 2000 10:48:48 +0200 (MET DST)
- In-reply-to: Tanaka Akira's message of 16 Apr 2000 00:59:00 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> serein% bindkey -e; autoload -U compinit; compinit -D
> serein% _tst () { _arguments -+o }
> serein% tst +o <TAB>
> ->
> serein% tst +o +o
>
> +o is completed more than once.
Oops. The xor list wasn't set up correctly.
Bye
Sven
Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.6
diff -u -r1.6 computil.c
--- Src/Zle/computil.c 2000/04/17 08:04:42 1.6
+++ Src/Zle/computil.c 2000/04/17 08:48:17
@@ -623,7 +623,7 @@
* stuff twice for such things. */
name = ++p;
*p = (again ? '-' : '+');
- again = 1 - again;
+ again++;
} else {
name = p;
/* If it's a long option skip over the first `-'. */
@@ -767,7 +767,7 @@
opt->descr = NULL;
} else
opt->descr = NULL;
- opt->xor = xor;
+ opt->xor = (again == 1 ? zarrdup(xor) : xor);
opt->type = otype;
opt->args = oargs;
opt->num = nopts++;
@@ -783,7 +783,7 @@
if (single && name[1] && !name[2])
ret->single[STOUC(name[1])] = opt;
- if (again) {
+ if (again == 1) {
/* Do it all again for `*-...'. */
p = dupstring(*args);
goto rec;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author