* PATCH: Re: _arguments -+o
@ 2000-04-17 8:48 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-04-17 8:48 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-17 8:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-17 8:48 PATCH: Re: _arguments -+o Sven Wischnowsky
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).