1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-23 01:31:27 +01:00

allow subscripts for compadd -[ak]; new style for history completion; better list-colors handling (12029)

This commit is contained in:
Sven Wischnowsky 2000-06-22 08:42:36 +00:00
parent 44b34667f8
commit b9a533f382
19 changed files with 209 additions and 93 deletions

View file

@ -3200,7 +3200,7 @@ cfp_matcher_pats(char *matcher, char *add)
}
}
if (*add) {
char *ret = "", buf[259], *oadd = add;
char *ret = "", buf[259];
for (mp = ms; *add; add++, mp++) {
if (!(m = *mp)) {
@ -3661,6 +3661,32 @@ bin_compfiles(char *nam, char **args, char *ops, int func)
return 1;
}
static int
bin_compgroups(char *nam, char **args, char *ops, int func)
{
Heap oldheap;
char *n;
SWITCHHEAPS(oldheap, compheap) {
while ((n = *args++)) {
endcmgroup(NULL);
begcmgroup(n, 0);
endcmgroup(NULL);
begcmgroup(n, CGF_NOSORT);
endcmgroup(NULL);
begcmgroup(n, CGF_UNIQALL);
endcmgroup(NULL);
begcmgroup(n, CGF_NOSORT|CGF_UNIQCON);
endcmgroup(NULL);
begcmgroup(n, CGF_UNIQALL);
endcmgroup(NULL);
begcmgroup(n, CGF_NOSORT|CGF_UNIQCON);
}
} SWITCHBACKHEAPS(oldheap);
return 0;
}
static struct builtin bintab[] = {
BUILTIN("compdescribe", 0, bin_compdescribe, 3, -1, 0, NULL, NULL),
BUILTIN("comparguments", 0, bin_comparguments, 1, -1, 0, NULL, NULL),
@ -3670,6 +3696,7 @@ static struct builtin bintab[] = {
BUILTIN("comptry", 0, bin_comptry, 0, -1, 0, NULL, NULL),
BUILTIN("compfmt", 0, bin_compfmt, 2, -1, 0, NULL, NULL),
BUILTIN("compfiles", 0, bin_compfiles, 1, -1, 0, NULL, NULL),
BUILTIN("compgroups", 0, bin_compgroups, 1, -1, 0, NULL, NULL),
};