mblaze

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

commit d4f72ab52db2cb69b32f0b10de53b46139000cf2
parent 2ad6ae80d8512c985fd613e5340c472582225dcd
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Thu, 11 Aug 2016 20:32:54 +0200

mscan: add %I for message-id

Diffstat:
man/mscan.1 | 4++++
mscan.c | 13++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/man/mscan.1 b/man/mscan.1 @@ -135,6 +135,10 @@ Human-readable size of the message (in kilobytes). The Maildir folder the message resides in. .It Cm "%" Ns Oo Ar wd Oc Ns Cm "R" The filename of the message. +.It Cm "%" Ns Oo Ar wd Oc Ns Cm "I" +The +.Sq Li Message-ID +of the message. .El .El .Sh MESSAGE FLAGS diff --git a/mscan.c b/mscan.c @@ -455,10 +455,21 @@ oneline(char *file) else wleft -= printf("%s", file); break; + case 'I': + { + char *m = msg ? blaze822_hdr(msg, "message-id") : 0; + if (!m) + m = "(unknown)"; + if (w) + wleft -= printf("%*.*s", w, w, m); + else + wleft -= printf("%s", m); + } + break; default: putchar('%'); putchar(*f); - wleft -=2; + wleft -= 2; } }