MHLIST(1)

πŸ‘‘ mhlist β€” General Commands Manual, section 1 πŸ‘‘

hiii bestie πŸ’– welcome to mhlist, straight outta the General Commands Manual (that's section 1, periodt). she's a Unix girlie and she's so good at what she does.


🌸 NAME 🌸

mhlist β€” list information about nmh MIME messages πŸ¦‹

that's the whole assignment. she lists. she slays.


✨ SYNOPSIS ✨

mhlist [-help] [-version] [+folder] [msgs] [-file file] [-part number]
     ...  [-type content] ...  [-prefer content] ...  [-noprefer]
     [-headers | -noheaders] [-realsize | -norealsize] [-changecur |
     -nochangecur] [-verbose | -noverbose] [-disposition |
     -nodisposition]

πŸ’« DESCRIPTION πŸ’«

okay so here's the whole vibe: mhlist lets you list information β€” a table of contents, essentially β€” about the various parts of a collection of MIME (multi-media) messages. like, all of them. the whole squad. πŸ’…

mhlist manipulates MIME messages as specified in RFC 2045 to RFC 2049 (See mhbuild(1)). iykyk.

here's the switch lineup, in order, every single one of them, no skips:

  • -headers β€” this one says a one-line banner should be displayed above the listing. and yes, this is the default, she just comes out the box like that. πŸŽ€
  • -realsize β€” tells mhlist to evaluate the β€œnative” (decoded) format of each content before listing it. you get an accurate count, but you pay for it with a small delay. in either case, sizes get expressed using SI prefix abbreviations (K/M/G/T), which are based on factors of 1000. numbers stay numbers, bestie. πŸ“
  • -verbose β€” if this switch is present, the listing will show any β€œextra” information that's present in the message, like comments in the β€œContent-Type” header. she's nosy and we love her for it πŸ™ˆ
  • -disposition β€” if this switch is present, the listing will show any relevant information from the β€œContent-Disposition” header.
  • -file file β€” directs mhlist to use the specified file as the source message, rather than a message from a folder. and if you specify this file as β€œ-”, then mhlist will accept the source message on the standard input πŸ‘‘. quick heads up though: the file, or the input from standard input, should be a validly formatted message, just like any other nmh message. it should not be in mail drop format (to convert a file in mail drop format to a folder of nmh messages, see inc(1)).

by default, mhlist will list information about the entire message (all of its parts). but by using the -part, -type, and -prefer switches, you may limit and reorder the set of parts to be listed, based on part number and/or content type. choose your own adventure πŸ’–


a part specification consists of a series of numbers separated by dots. for example, in a multipart content containing three parts, these would be named as 1, 2, and 3, respectively. if part 2 was also a multipart content containing two parts, those would be named as 2.1 and 2.2, respectively. note that the -part switch is effective only for messages containing a multipart content. if a message has some other kind of content, or if the part is itself another multipart content, the -part switch will not prevent the content from being acted upon. she does what she wants sometimes πŸ’€


the -type switch can also be used to restrict (or, when used in conjunction with -part, to further restrict) the selection of parts according to content type. one or more -type switches β€” part will only select the first match from a multipart/alternative, even if there is more than one subpart that matches (one of) the given content type(s).

using either -part or -type switches alone will cause either to select the part(s) they match. using them together will select only the part(s) matched by both (sets of) switches. in other words, the result is the intersection, and not the union, of their separate match results. math ate, honestly. ✨


a content specification consists of a content type and a subtype. the initial list of β€œstandard” content types and subtypes can be found in RFC 2046.

a list of commonly used contents is briefly reproduced here:

Type         Subtypes
----         --------
text         plain, enriched
multipart    mixed, alternative, digest, parallel
message      rfc822, external-body
application  octet-stream, postscript
image        jpeg, gif, png
audio        basic
video        mpeg

a legal MIME message must contain a subtype specification. that's not a suggestion, that's the law πŸ“œ

to specify a content, regardless of its subtype, just use the name of the content, e.g., β€œaudio”. to specify a specific subtype, separate the two with a slash, e.g., β€œaudio/basic”. note that regardless of the values given to the -type switch, a multipart content (of any subtype listed above) is always acted upon. further note that if the -type switch is used, and it is desirable to act on a message/external-body content, then the -type switch must be used twice: once for message/external-body and once for the content externally referenced. two for two, no shortcuts 🫢


by default, the parts of a multipart/alternative part are listed in the reverse order of their placement in the message. the listing, therefore, is in decreasing order of preference, as defined in RFC 2046. the -prefer switch can be used (one or more times, in order of ascending preference) to let MH know which content types from a multipart/alternative MIME part are preferred by the user, in order to override the default preference order. so when viewed by mhlist, the ordering of multipart/alternative parts will appear to change when invoked with or without various -prefer switches πŸ‘€. the -noprefer switch will cancel any previous -prefer switches.

and ngl, the -prefer and -noprefer switches are functionally most important for mhshow, but they're also implemented in mhlist and mhstore to make common part numbering possible across all three programs. it's giving teamwork. πŸ’œ


πŸ“ FILES πŸ“

  • $HOME/.mh_profile β€” the user profile πŸŽ€

🧚 PROFILE COMPONENTS 🧚

  • Path: β€” to determine the user's nmh directory
  • Current-Folder: β€” to find the default current folder

🌈 SEE ALSO 🌈

go read them, they're all part of the same friend group πŸ’–


⭐ DEFAULTS ⭐

  • +folder defaults to the current folder
  • msgs defaults to cur
  • -headers
  • -realsize
  • -changecur
  • -noverbose
  • -nodisposition

πŸ’œ CONTEXT πŸ’œ

if a folder is given, it will become the current folder. the last message selected will become the current message, unless the -nochangecur option is specified. so like, know that before you go changing things, bestie 😭


and that's the whole page, no cap πŸ’… this one's from nmh-1.8, dated 2015-02-06 β€” she's vintage, she's iconic, she's the moment. mwah 😘

πŸ“¦ where this page comes from