about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-18 09:50:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-18 09:50:28 +0000
commitfb4efa36cf6a9c8b5aec2dcabda9faa03ef767cd (patch)
treee91bd2cd1011b1f85c39d560f9e1728ffc5b13aa
parentfca4dce5aecbb14ddd2e6b8f0832417c68edc989 (diff)
downloadzsh-fb4efa36cf6a9c8b5aec2dcabda9faa03ef767cd.tar.gz
zsh-fb4efa36cf6a9c8b5aec2dcabda9faa03ef767cd.tar.xz
zsh-fb4efa36cf6a9c8b5aec2dcabda9faa03ef767cd.zip
zsh-workers/8316
-rw-r--r--Completion/Base/_arguments1
-rw-r--r--Src/Zle/computil.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index e74b2763e..0d4946285 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -190,7 +190,6 @@ if comparguments -i "$compconfig[autodescribe_options]" "$@"; then
 
           [[ -n "$matched" ]] && compadd -n -Q -S '' -s "$SUFFIX" - "$PREFIX"
           _message "$descr"
-          break
 
         elif [[ "$action" = \(\(*\)\) ]]; then
 
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index a636ec066..be1062fa3 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -976,13 +976,13 @@ ca_parse_line(Cadef d)
 	    else
 		state.curopt = NULL;
 	} else {
-	    state.opt = (line[0] && line[1]);
+	    state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
 	    state.arg = 1;
 	    state.curopt = NULL;
 	}
 	pe = NULL;
 
-	if (state.opt && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
+	if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
 	    ddef = state.def = state.curopt->args;
 	    doff = pe - line;
 	    state.optbeg = state.argbeg = state.inopt = cur;
@@ -1009,7 +1009,7 @@ ca_parse_line(Cadef d)
 	    }
 	    if (!state.def)
 		state.curopt = NULL;
-	} else if (state.opt && d->single &&
+	} else if (state.opt == 2 && d->single &&
 		   (state.curopt = ca_get_sopt(d, line, 0, &pe))) {
 	    char *p;
 	    Caopt tmpopt;