From fb4efa36cf6a9c8b5aec2dcabda9faa03ef767cd Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 18 Oct 1999 09:50:28 +0000 Subject: zsh-workers/8316 --- Src/Zle/computil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/Zle/computil.c') 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; -- cgit 1.4.1