mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-28 06:49:49 +02:00
42575: fix to not complete options in the argument to another option
This commit is contained in:
parent
35734810d1
commit
25da576c29
@ -1,3 +1,8 @@
|
||||
2018-04-05 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* 42575: Src/Zle/computil.c, Test/Y03arguments.ztst: fix to not
|
||||
complete options in the argument to another option
|
||||
|
||||
2018-04-05 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 42577: Completion/Unix/Command/_strings: fix macOS support
|
||||
|
@ -2675,7 +2675,7 @@ bin_comparguments(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
|
||||
|
||||
for (; lstate; lstate = lstate->snext) {
|
||||
if (lstate->actopts &&
|
||||
(lstate->opt || lstate->def ||
|
||||
(lstate->opt || (ca_doff && lstate->def) ||
|
||||
(lstate->def && lstate->def->opt &&
|
||||
(lstate->def->type == CAA_OPT ||
|
||||
(lstate->def->type >= CAA_RARGS &&
|
||||
|
@ -184,6 +184,12 @@
|
||||
0:sticky option argument
|
||||
>line: {tst -x }{}
|
||||
|
||||
tst_arguments '-x:arg' -y -z
|
||||
comptest $'tst -x -\t'
|
||||
0:option argument with prefix that passes option prefix-needed test
|
||||
>line: {tst -x -}{}
|
||||
>DESCRIPTION:{arg}
|
||||
|
||||
tst_arguments '-x[desc]'
|
||||
comptest $'tst -x\t'
|
||||
0:end of option sequence
|
||||
@ -721,6 +727,15 @@ F:shouldn't offer -t in the first case (with stacked options)
|
||||
>line: {tst --prefix=one }{}
|
||||
>line: {tst --prefix=one --prop=}{}
|
||||
|
||||
tst_arguments -s -W -a+:arg -b
|
||||
comptest $'tst -a\t'
|
||||
0:with -W options mixed with arguments
|
||||
>line: {tst -a}{}
|
||||
>DESCRIPTION:{arg}
|
||||
>DESCRIPTION:{option}
|
||||
>NO:{-b}
|
||||
|
||||
|
||||
%clean
|
||||
|
||||
zmodload -ui zsh/zpty
|
||||
|
Loading…
Reference in New Issue
Block a user