diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-18 13:10:07 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-07-18 13:10:07 +0000 |
commit | 8c1b953b5a6c49d47f55d311d16852f94d2ebeed (patch) | |
tree | bbd14925f61c99b3aa89067b89e82abbae4f253e /Src/Zle/complist.c | |
parent | 40f651019666eba2c3c8a53055f16d28f6ed9385 (diff) | |
download | zsh-8c1b953b5a6c49d47f55d311d16852f94d2ebeed.tar.gz zsh-8c1b953b5a6c49d47f55d311d16852f94d2ebeed.tar.xz zsh-8c1b953b5a6c49d47f55d311d16852f94d2ebeed.zip |
add list-grouped option to make options and such be grouped together if they have the same description; matches with line-display strings can be hidden; hi and du capabalities in complist are only used if set by the user (15407)
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r-- | Src/Zle/complist.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index f76e54116..94fd2cc56 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -77,7 +77,7 @@ static char *colnames[] = { static char *defcols[] = { "0", "0", "1;31", "1;36", "33", "1;35", "1;33", "1;33", "1;32", NULL, - "\033[", "m", NULL, "0", "0", "7", "0", "0" + "\033[", "m", NULL, "0", "0", "7", NULL, NULL }; /* This describes a terminal string for a file type. */ @@ -444,6 +444,7 @@ zcputs(Listcols c, char *group, int colour) return; } + zlrputs(c, "0"); } /* Turn off colouring. */ @@ -1170,7 +1171,8 @@ compprintlist(int showall) p = g->matches; for (; (m = *p); p++) { - if (m->disp && (m->flags & CMF_DISPLINE)) { + if (m->disp && (m->flags & CMF_DISPLINE) && + (showall || !(m->flags & (CMF_HIDE|CMF_NOLIST)))) { if (pnl) { if (dolistnl(ml) && compprintnl(ml)) goto end; @@ -1412,9 +1414,11 @@ clprintm(Cmgroup g, Cmatch *mp, int mc, int ml, int lastc, int width, mgtabp = mgtab + mm; mmlen = mcols; zcputs(&mcolors, g->name, COL_MA); - } else if (m->flags & CMF_NOLIST) + } else if ((m->flags & CMF_NOLIST) && + mcolors.files[COL_HI] && mcolors.files[COL_HI]->col) zcputs(&mcolors, g->name, COL_HI); - else if (mselect >= 0 && (m->flags & (CMF_MULT | CMF_FMULT))) + else if (mselect >= 0 && (m->flags & (CMF_MULT | CMF_FMULT)) && + mcolors.files[COL_DU] && mcolors.files[COL_DU]->col) zcputs(&mcolors, g->name, COL_DU); else subcols = putmatchcol(&mcolors, g->name, m->disp); |