diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Doc/Zsh/compsys.yo | 6 | ||||
-rw-r--r-- | Src/Zle/computil.c | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index aad48a5b5..8626a794c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-05-10 Sven Wischnowsky <wischnow@zsh.org> + + * 11298: Doc/Zsh/compsys.yo, Src/Zle/computil.c: more fixes for + _arguments and its docs + 2000-05-10 Bart Schaefer <schaefer@zsh.org> * 11297: Doc/Zsh/compwid.yo, Doc/Zsh/zle.yo: Document that ZLE diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 69701dd34..b345b8d42 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -3083,8 +3083,10 @@ the values. For options that have more than one argument these are given as one string, separated by colons. All colons in the original arguments are preceded with backslashes. -The parameter `tt(context)' will be set to the automatically created -context names. These are either strings of the form +The parameter `tt(context)' (only set in the calling function when +using an action of the form `tt(->)var(string)', not during the +evaluation of other var(action)s) will be set to the automatically +created context names. These are either strings of the form `tt(option)var(-opt)tt(-)var(n)' for the var(n)'th argument of the option var(-opt), or strings of the form `tt(argument-)var(n)' for the var(n)'th argument (for rest arguments the var(n) is the string diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index cb028e315..b72132895 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -1198,14 +1198,12 @@ ca_parse_line(Cadef d, int multi) if (state.def->type == CAA_REST || state.def->type == CAA_RARGS || state.def->type == CAA_RREST) { - if (state.curopt) - state.oopt++; if (state.def->end && pattry(endpat, line)) { state.def = NULL; state.curopt = NULL; state.opt = state.arg = 1; state.argend = ca_laststate.argend = cur - 1; - continue; + goto cont; } } else if ((state.def = state.def->next)) { state.argbeg = cur; @@ -1379,6 +1377,8 @@ ca_parse_line(Cadef d, int multi) /* Copy the state into the global one. */ + cont: + if (cur + 1 == compcurrent) { memcpy(&ca_laststate, &state, sizeof(state)); ca_laststate.ddef = NULL; |