mscan: add %I for message-id

This commit is contained in:
Christian Neukirchen 2016-08-11 20:32:54 +02:00
parent 2ad6ae80d8
commit d4f72ab52d
2 changed files with 16 additions and 1 deletions

View File

@ -135,6 +135,10 @@ Human-readable size of the message (in kilobytes).
The Maildir folder the message resides in. The Maildir folder the message resides in.
.It Cm "%" Ns Oo Ar wd Oc Ns Cm "R" .It Cm "%" Ns Oo Ar wd Oc Ns Cm "R"
The filename of the message. 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
.El .El
.Sh MESSAGE FLAGS .Sh MESSAGE FLAGS

11
mscan.c
View File

@ -455,6 +455,17 @@ oneline(char *file)
else else
wleft -= printf("%s", file); wleft -= printf("%s", file);
break; 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: default:
putchar('%'); putchar('%');
putchar(*f); putchar(*f);