mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
zsh-workers/8316
This commit is contained in:
parent
fca4dce5ae
commit
fb4efa36cf
2 changed files with 3 additions and 4 deletions
|
@ -190,7 +190,6 @@ if comparguments -i "$compconfig[autodescribe_options]" "$@"; then
|
||||||
|
|
||||||
[[ -n "$matched" ]] && compadd -n -Q -S '' -s "$SUFFIX" - "$PREFIX"
|
[[ -n "$matched" ]] && compadd -n -Q -S '' -s "$SUFFIX" - "$PREFIX"
|
||||||
_message "$descr"
|
_message "$descr"
|
||||||
break
|
|
||||||
|
|
||||||
elif [[ "$action" = \(\(*\)\) ]]; then
|
elif [[ "$action" = \(\(*\)\) ]]; then
|
||||||
|
|
||||||
|
|
|
@ -976,13 +976,13 @@ ca_parse_line(Cadef d)
|
||||||
else
|
else
|
||||||
state.curopt = NULL;
|
state.curopt = NULL;
|
||||||
} else {
|
} else {
|
||||||
state.opt = (line[0] && line[1]);
|
state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
|
||||||
state.arg = 1;
|
state.arg = 1;
|
||||||
state.curopt = NULL;
|
state.curopt = NULL;
|
||||||
}
|
}
|
||||||
pe = 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;
|
ddef = state.def = state.curopt->args;
|
||||||
doff = pe - line;
|
doff = pe - line;
|
||||||
state.optbeg = state.argbeg = state.inopt = cur;
|
state.optbeg = state.argbeg = state.inopt = cur;
|
||||||
|
@ -1009,7 +1009,7 @@ ca_parse_line(Cadef d)
|
||||||
}
|
}
|
||||||
if (!state.def)
|
if (!state.def)
|
||||||
state.curopt = NULL;
|
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))) {
|
(state.curopt = ca_get_sopt(d, line, 0, &pe))) {
|
||||||
char *p;
|
char *p;
|
||||||
Caopt tmpopt;
|
Caopt tmpopt;
|
||||||
|
|
Loading…
Reference in a new issue