1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-16 12:21:18 +02:00

35704: compadd -E 0 should imply -J and -2

This commit is contained in:
Oliver Kiddle 2015-07-06 22:40:47 +02:00
parent 0b946c18ea
commit 68a5a5f453
4 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2015-07-06 Oliver Kiddle <opk@zsh.org>
* 35704: Doc/Zsh/compwid.yo, Src/Zle/compcore.c, Src/Zle/complete.c;
compadd -E 0 should imply -J and -2
2015-07-06 Mikael Magnusson <mikachu@gmail.com>
* 35696: Completion/Unix/Type/_ps1234: complete colors for %F{

View file

@ -697,7 +697,9 @@ format completion lists and to make explanatory string be shown in
completion lists (since empty matches can be given display strings
with the tt(-d) option). And because all but one empty string would
otherwise be removed, this option implies the tt(-V) and tt(-2)
options (even if an explicit tt(-J) option is given).
options (even if an explicit tt(-J) option is given). This can be
important to note as it affects the name space into which matches are
added.
)
xitem(tt(-))
item(tt(-)tt(-))(

View file

@ -2049,7 +2049,7 @@ addmatches(Cadata dat, char **argv)
Heap oldheap;
SWITCHHEAPS(oldheap, compheap) {
if (dat->dummies)
if (dat->dummies >= 0)
dat->aflags = ((dat->aflags | CAF_NOSORT | CAF_UNIQCON) &
~CAF_UNIQALL);
@ -2534,7 +2534,7 @@ addmatches(Cadata dat, char **argv)
addmatch("<all>", dat->flags | CMF_ALL, &disp, 1);
hasallmatch = 1;
}
while (dat->dummies--)
while (dat->dummies-- > 0)
addmatch("", dat->flags | CMF_DUMMY, &disp, 0);
} SWITCHBACKHEAPS(oldheap);

View file

@ -540,7 +540,7 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
dat.match = NULL;
dat.flags = 0;
dat.aflags = CAF_MATCH;
dat.dummies = 0;
dat.dummies = -1;
for (; *argv && **argv == '-'; argv++) {
if (!(*argv)[1]) {