mscan: add %I for message-id

pull/2/head
Christian Neukirchen 8 years ago
parent 2ad6ae80d8
commit d4f72ab52d

@ -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

@ -455,10 +455,21 @@ 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);
wleft -=2; wleft -= 2;
} }
} }

Loading…
Cancel
Save