mshow: add "-A all" to render all attachments

Closes #198.
pull/201/head
Leah Neukirchen 3 years ago
parent 8e0d57425f
commit 318ac214f1

@ -346,7 +346,7 @@ _mshow() {
- regular \
'-n[only print message numbers]' \
'-h[display only given headers]:header list:_mblaze_colon_separated_headers' \
'-A[mixed/alternative preference]:mime type: ' \
'-A[multipart/alternative preference]:mime type: ' \
'-n[don'\''t update current message link]' \
'(-r)-q[print only header]' \
'(-q)-r[print body raw]' \

@ -1,4 +1,4 @@
.Dd August 24, 2018
.Dd January 17, 2021
.Dt MSHOW 1
.Os
.Sh NAME
@ -47,17 +47,26 @@ instead of the default headers
.Sq Li from\&:subject\&:to\&:cc\&:date\&:reply\&-to\&: .
.It Fl A Ar mimetypes
Define
.Sq Li "mixed/alternative"
.Sq Li "multipart/alternative"
preference.
.Ar mimetypes
is a colon-separated list of
MIME types which will be preferred,
in the order given,
when rendering
.Sq Li "mixed/alternative"
.Sq Li "multipart/alternative"
parts.
If no MIME type matches, the first MIME part will be rendered.
.Pp
When
.Ar mimetypes
is
.Sq Li all ,
.Nm
will render all parts of a
.Sq Li "multipart/alternative"
part.
.Pp
Defaults to
.Sq Li "text/plain:text/html" .
.It Fl n

@ -316,9 +316,10 @@ nofilter:
}
printf("\n");
} else if (strncmp(ct, "multipart/alternative", 21) == 0) {
choose_alternative(msg, depth);
r = MIME_PRUNE;
if (strcmp(Aflag, "all") != 0) {
choose_alternative(msg, depth);
r = MIME_PRUNE;
} // else default blaze822_mime_walk action
} else if (strncmp(ct, "multipart/", 10) == 0) {
; // default blaze822_mime_walk action
} else {

Loading…
Cancel
Save