From 3bca186819e7e1e0fc6321592ccc62d75e0525be Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 8 Aug 2000 12:11:42 +0000 Subject: handle the right option in strings with multiple single-letter options (and correctly handle its argument) (12567) --- Src/Zle/computil.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 863f15fa1..fcc79b2c4 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -1108,6 +1108,7 @@ ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp) line++; *end = line; } + pp = p; break; } } else if (!p || (p && !p->active)) @@ -1429,7 +1430,9 @@ ca_parse_line(Cadef d, int multi, int first) if (!state.oargs[state.curopt->num]) state.oargs[state.curopt->num] = znewlinklist(); - ddef = state.def = state.curopt->args; + state.def = state.curopt->args; + ddef = (state.curopt->type == CAO_NEXT && cur == compcurrent ? + NULL : state.def); dopt = state.curopt; doff = pe - line; state.optbeg = state.argbeg = state.inopt = cur; -- cgit 1.4.1