diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-31 09:56:12 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-31 09:56:12 +0000 |
commit | 5a4253f42edc9258a9a5bad59b0fa2a7b4a46d50 (patch) | |
tree | 1c6cc1e77f12396acd87e448e777fbb5a143b03f /Src/Zle/compresult.c | |
parent | fd25b24df6b4f098944c4994195d3894a27a8208 (diff) | |
download | zsh-5a4253f42edc9258a9a5bad59b0fa2a7b4a46d50.tar.gz zsh-5a4253f42edc9258a9a5bad59b0fa2a7b4a46d50.tar.xz zsh-5a4253f42edc9258a9a5bad59b0fa2a7b4a46d50.zip |
allow display of only messages via $compstate[list]=messages (11688)
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r-- | Src/Zle/compresult.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 4ffd4d62a..1e807a93d 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1170,7 +1170,8 @@ comp_list(char *v) zsfree(complist); complist = ztrdup(v); - onlyexpl = (v && strstr(v, "expl")); + onlyexpl = (v ? ((strstr(v, "expl") ? 1 : 0) | + (strstr(v, "messages") ? 2 : 0)) : 0); } /* This skips over matches that are not to be listed. */ @@ -1300,7 +1301,9 @@ calclist(int showall) } if ((e = g->expls)) { while (*e) { - if ((*e)->count) + if ((*e)->count && + (!onlyexpl || + (onlyexpl & ((*e)->count > 0 ? 1 : 2)))) nlines += 1 + printfmt((*e)->str, (*e)->count, 0, 1); e++; } @@ -1690,7 +1693,9 @@ printlist(int over, CLPrintFunc printm, int showall) int l; while (*e) { - if ((*e)->count) { + if ((*e)->count && + (!listdat.onlyexpl || + (listdat.onlyexpl & ((*e)->count > 0 ? 1 : 2)))) { if (pnl) { putc('\n', shout); pnl = 0; |