mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit a37c401ad1df49879a520f06322809a3f053bbf1
parent 235abbd53f59a8da3ac3817fa53d3b49991f3cbc
Author: Duncaen <mail@duncano.de>
Date:   Thu, 28 Jul 2016 18:47:17 +0200

mpick: add info expression for message ids without files

and mark them seen by default

Diffstat:
man/mpick.1 | 2+-
mpick.c | 9+++++++++
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/man/mpick.1 b/man/mpick.1 @@ -96,7 +96,7 @@ tests are given by the following EBNF: | prune -- do not match futher messages in thread | print -- always true value -<flagprop> ::= child | draft | flagged | new | parent | passed +<flagprop> ::= child | draft | flagged | info | new | parent | passed | replied | seen | selected | trashed <timeprop> ::= atime | ctime | mtime | date diff --git a/mpick.c b/mpick.c @@ -87,6 +87,8 @@ enum flags { FLAG_PARENT = 256, FLAG_CHILD = 512, + + FLAG_INFO = 1024, }; struct expr { @@ -413,6 +415,8 @@ parse_flag() flag = FLAG_NEW; } else if (token("cur")) { flag = FLAG_CUR; + } else if (token("info")) { + flag = FLAG_INFO; } else if (token("parent")) { flag = FLAG_PARENT; need_thr = 1; @@ -849,6 +853,11 @@ mailfile(char *file) while (m->fpath < e && (*e == ' ' || *e == '\t')) *e-- = 0; + if (m->fpath[0] == '<') { + m->flags |= FLAG_SEEN | FLAG_INFO; + return m; + } + m->msg = blaze822(m->fpath); if (!m->msg) return m;