mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
comparguments: don't use rest-argument-specification if it was inactivated (12897)
This commit is contained in:
parent
62df18f0d8
commit
a93e62c630
@ -1,5 +1,8 @@
|
||||
2000-10-05 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12897: Src/Zle/computil.c: comparguments: don't use
|
||||
rest-argument-specification if it was inactivated
|
||||
|
||||
* 12896: Doc/Zsh/arith.yo, Doc/Zsh/builtins.yo, Doc/Zsh/compctl.yo,
|
||||
Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, Doc/Zsh/expn.yo,
|
||||
Doc/Zsh/func.yo, Doc/Zsh/mod_complist.yo: cleanup
|
||||
|
@ -1685,7 +1685,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
|
||||
|
||||
if (!opt) {
|
||||
if (arg->num >= 0 && !arg->next && miss)
|
||||
arg = ca_laststate.d->rest;
|
||||
arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
|
||||
ca_laststate.d->rest : NULL);
|
||||
else {
|
||||
onum = arg->num;
|
||||
rest = (onum != arg->min && onum == ca_laststate.nth);
|
||||
@ -1693,7 +1694,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
|
||||
if (arg->num != onum + 1)
|
||||
miss = 1;
|
||||
} else if (rest || (oopt > 0 && !opt)) {
|
||||
arg = ca_laststate.d->rest;
|
||||
arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
|
||||
ca_laststate.d->rest : NULL);
|
||||
oopt = -1;
|
||||
}
|
||||
}
|
||||
@ -1711,7 +1713,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
|
||||
}
|
||||
if (!opt && oopt > 0) {
|
||||
oopt = -1;
|
||||
arg = ca_laststate.d->rest;
|
||||
arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
|
||||
ca_laststate.d->rest : NULL);
|
||||
|
||||
goto rec;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user