MSHOW(1)

πŸ“¦
version 1.4 Β· 2 versions
, in alpine 3.24, nixos 26.05, nixpkgs unstable

πŸ’Œ MSHOW(1) πŸ’Œ

okay so bestie, gather round, because mshow is literally that girl πŸ’… β€” she renders your messages and extracts MIME parts, and she does it beautifully. this is a General Commands Manual situation, so let's get into it ✨


🌸 NAME 🌸

mshow β€” render messages and extract MIME parts

πŸ¦‹ SYNOPSIS πŸ¦‹

mshow [-h headers] [-A mimetypes] [-nqrBFHLN] [msgs ...]
mshow -x msg parts ...
mshow -O msg parts ...
mshow -t msgs ...
mshow -R msg

πŸ’– DESCRIPTION πŸ’–

so mshow renders the specified msgs to standard output, by default, periodt. (and if you're wondering about the whole message argument situation, see mmsg(7) for all the deets β€” it's giving essential reading 🫢)

and like, if you're using it interactively and you didn't specify any msgs, mshow just goes ahead and displays the current message with colorization and a pager. main character energy, honestly πŸ‘‘

the options are as follows, and yes, we're going through all of them:

✨ OPTIONS ✨

  • -h headers β€” Display the headers in the colon-separated list headers, instead of the default headers from:subject:to:cc:date:reply-to:. iconic defaults, ngl πŸ’…
  • -A mimetypes β€” Define multipart/alternative preference. mimetypes is a colon-separated list of MIME types which will be preferred, in the order given, when rendering multipart/alternative parts. If no MIME type matches, the last MIME part will be rendered.

and like, when mimetypes is all, mshow will render all parts of a multipart/alternative part. slay.

Defaults to text/plain:text/html. πŸŽ€

  • -n β€” Don't update the current message link.
  • -q β€” Don't render the body, stop after header output. sometimes you just want the vibes, not the content, yk?
  • -r β€” Don't render the body, print raw body. > ⚠️ This may be dangerous to use on a tty. like, fr fr, be careful bestie 😭
  • -B β€” Decode encoded-words also in MIME parameters in direct violation of RFC 2047. This is useful if the attachment names look like =?UTF-8?Q?stuff?=. yes, we're being rebellious, and honestly? valid πŸ™ˆ
  • -F β€” Don't apply filters to MIME parts.
  • -H β€” Don't decode the headers, print all raw headers. > ⚠️ This may be dangerous to use on a tty. again, watch out 😭
  • -L β€” Don't filter the headers, print all decoded headers.
  • -N β€” Don't show MIME structure markers.
  • -x msg β€” Switch to extraction mode: extract parts from the message msg into files. parts can be specified by number, filename or fnmatch(3) pattern. If no parts are specified, extracts all attachments with a filename. very demure, very mindful extraction πŸ’–
  • -O msg β€” Like -x but write to standard output. > ⚠️ This may be dangerous to use on a tty. and when used together with -r, the whole part is raw, that is, un-decoded and including MIME part headers. so raw, so real πŸ”₯
  • -t β€” Switch to list mode: list all MIME parts of each msg. the way this just lists everything? obsessed.
  • -R msg β€” Render the text parts from msg, suitable for use in a reply. perfect for when you need to quote someone but make it cute πŸŽ€

🧚 FILTERS 🧚

mshow, by default, decodes all text/*, message/rfc822 and multipart/* parts, and re-encodes them into UTF-8 if necessary. lowkey doing the most so you don't have to 🫢

other filters can be specified in the file ${MBLAZE:-$HOME/.mblaze}/filter (or via MAILFILTER), in the format:

type/subtype: command

or

type: command

mshow will then spawn a pipe to command, write the MIME part to standard input and display the output. the environment variable PIPE_CHARSET will be set to the charset declared in the MIME part, if known. bestie communication, honestly ✨

filters can communicate with mshow using their exit status, and this is where it gets technical:

  1. 0 β€” The output is printed as plain text.
  2. 62 β€” The output is printed raw, without escaping.
  3. 63 β€” Behave as if the filter never ran.
  4. 64 β€” The output is an RFC 5322 message that should be rendered again.
  5. 65 to 80 β€” Render the n-64th part of this text/multipart part.

all other exit statuses are regarded as errors. so like, stick to the script, okay? πŸ’€

🌈 ENVIRONMENT 🌈

  • MAILFILTER β€” Path to an alternative filter file.
  • MBLAZE_NOCOLOR β€” If non-empty, mshow will not spawn a colorization filter. (but like, why would you want that? the color is the whole point πŸŽ€)
  • MBLAZE_PAGER β€” Any non-empty value of the environment variable MBLAZE_PAGER is used instead of the standard pagination program, specified in PAGER. When empty or set to cat, no pager is spawned. iykyk πŸ’…

⭐ EXIT STATUS ⭐

The mshow utility exits 0 on success, and >0 if an error occurs. simple, clean, iconic.

πŸ‘‘ SEE ALSO πŸ‘‘

mmsg(7)

πŸ’œ AUTHORS πŸ’œ

Leah Neukirchen <leah@vuxu.org> β€” an absolute legend 🫢

πŸ“ LICENSE πŸ“

mshow is in the public domain.

To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work.

http://creativecommons.org/publicdomain/zero/1.0/


and that's the whole thing, bestie! this page is from the Debian source, dated January 17, 2021, and it's giving classic manpage realness πŸ’– go forth and render those messages, you've got this 🌸✨

πŸ“¦ where this page comes from