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β tellsmhlistto 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.-filefile β directsmhlistto use the specified file as the source message, rather than a message from a folder. and if you specify this file as β-β, thenmhlistwill 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, seeinc(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 directoryCurrent-Folder:β to find the default current folder
π SEE ALSO π
go read them, they're all part of the same friend group π
β DEFAULTS β
+folderdefaults to the current foldermsgsdefaults tocur-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
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms