about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-10 11:53:05 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-10 11:53:05 +0000
commit2da726eaf11773318ac06cc24fa21569cd2758c8 (patch)
tree7fa47cbe813ae6aa01ae88be08528b66c0597faf
parentf1286d2fae17b15baf8e2ef8b0537ce89fb4f2e7 (diff)
downloadzsh-2da726eaf11773318ac06cc24fa21569cd2758c8.tar.gz
zsh-2da726eaf11773318ac06cc24fa21569cd2758c8.tar.xz
zsh-2da726eaf11773318ac06cc24fa21569cd2758c8.zip
more fixes for _arguments and its docs (11298)
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/compsys.yo6
-rw-r--r--Src/Zle/computil.c6
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;