From bc182b8c2f269a7f1ef2222a481b07f3488ae5f8 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 21 Oct 1999 12:54:28 +0000 Subject: zsh-workers/8360 --- Src/Zle/computil.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Src/Zle/computil.c') diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 9bd52d5c9..2b1409fb3 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -696,7 +696,8 @@ parse_cadef(char *nam, char **args) opt->name = ztrdup(name); if (descr) opt->descr = ztrdup(descr); - else if (adpre && oargs && !oargs->next) + else if (adpre && oargs && !oargs->next && + oargs->descr && oargs->descr[0]) opt->descr = tricat(adpre, oargs->descr, adsuf); else opt->descr = NULL; @@ -1118,8 +1119,15 @@ ca_parse_line(Cadef d) ca_laststate.doff = 0; } else if (cur == compcurrent && !ca_laststate.def) { if ((ca_laststate.def = ddef)) { - ca_laststate.doff = doff; - ca_laststate.opt = 0; + ca_laststate.singles = state.singles; + if (state.curopt && state.curopt->type == CAO_NEXT) { + ca_laststate.ddef = ddef; + ca_laststate.def = NULL; + ca_laststate.opt = 1; + } else { + ca_laststate.doff = doff; + ca_laststate.opt = 0; + } } else { ca_laststate.def = adef; ca_laststate.ddef = NULL; -- cgit 1.4.1