mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
fix for _arguments with single-letter options: recognize option-strings with multiple options; in _main_complete stop trying completers when one called _message, don't display warnings in such cases (12241)
This commit is contained in:
parent
663ecf8e12
commit
b46926af8d
3 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,11 @@
|
|||
2000-07-13 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12241: Completion/Core/_main_complete, Src/Zle/computil.c: fix
|
||||
for _arguments with single-letter options: recognize
|
||||
option-strings with multiple options; in _main_complete stop
|
||||
trying completers when one called _message, don't display warnings
|
||||
in such cases
|
||||
|
||||
* 12238: Src/Zle/zle_thingy.c: fix zle widget -n num with num>9
|
||||
|
||||
* 12237: Src/hist.c, Src/lex.c: slightly improved (z) flag for
|
||||
|
|
|
@ -156,6 +156,8 @@ for tmp in "$_completers[@]"; do
|
|||
fi
|
||||
(( _matcher_num++ ))
|
||||
done
|
||||
[[ -n "$_comp_mesg" ]] && break
|
||||
|
||||
(( _completer_num++ ))
|
||||
done
|
||||
|
||||
|
@ -265,7 +267,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
|
|||
elif [[ nm -le 1 && -n "$_comp_mesg" ]]; then
|
||||
compstate[insert]=''
|
||||
compstate[list]='list force messages'
|
||||
elif [[ nm -eq 0 &&
|
||||
elif [[ nm -eq 0 && -z "$_comp_mesg" &&
|
||||
$#_lastdescr -ne 0 && $compstate[old_list] != keep ]] &&
|
||||
zstyle -s ":completion:${curcontext}:warnings" format format; then
|
||||
|
||||
|
|
|
@ -1088,7 +1088,7 @@ ca_get_opt(Cadef d, char *line, int full, char **end)
|
|||
static Caopt
|
||||
ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp)
|
||||
{
|
||||
Caopt p;
|
||||
Caopt p, pp = NULL;
|
||||
char pre = *line++;
|
||||
LinkList l = NULL;
|
||||
|
||||
|
@ -1112,11 +1112,12 @@ ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp)
|
|||
}
|
||||
} else if (!p || (p && !p->active))
|
||||
return NULL;
|
||||
pp = p;
|
||||
p = NULL;
|
||||
}
|
||||
if (p && end)
|
||||
if (pp && end)
|
||||
*end = line;
|
||||
return p;
|
||||
return pp;
|
||||
}
|
||||
|
||||
/* Return the n'th argument definition. */
|
||||
|
|
Loading…
Reference in a new issue