MHPARAM(1mh)

πŸ“¦
version 1.8 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

mhparam β€” bestie, this one prints out your nmh profile and context components πŸ’–


🌸 SYNOPSIS 🌸

mhparam [-help] [-version] [components] [-all] [-component |
     -nocomponent] [-debug]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: mhparam writes the value of the profile component you asked for straight to standard output, and each one gets its own newline. Component name matching is case-insensitive, so don't stress about your shift key. And if the profile component isn't there at all? It just prints the default value β€” or literally nothing, if there's no default to print. πŸ’€

If you hand it the -component switch, then the component name shows up right alongside the profile component's value. Wanna turn that off? -nocomponent does exactly that. 🫢

Here's the little rule that gets people: if you list more than one component in the components list, then -component is on by default. If you only list one component, then -nocomponent is on by default. Slay, the tool reads your mind.

If -all is specified, then all components in the nmh profile get displayed, and every other argument just gets ignored. Periodt. πŸ‘‘

mhparam can also spill other info for you, like:

  • the nmh version identifier
  • where the nmh bindir, libexecdir, etcdir, and docdir install directories live
  • all proc settings
  • the datalocking method described in mh-profile(5)

Info about how your nmh installation is configured is up for grabs too, including the default mail spool locking method. And if you wanna test whether the configuration includes support for SASL, TLS, iconv(3), and oauth β€” the following commands will output a non-null string to indicate support, respectively:

mhparam sasl
mhparam tls
mhparam iconv
mhparam oauth

Conversely, no output means that support isn't included. Not included, not invited, not on the list. πŸ™ˆ And the -debug switch displays all such other information available from mhparam β€” like, the whole group chat. πŸ”₯

Examples, because seeing it hits different:

$ mhparam path
Mail

$ mhparam mhlproc
/usr/lib/mh/mhl

$ mhparam -component Path
Path: Mail

$ mhparam AliasFile rmmproc
AliasFile: aliases
rmmproc: rmmproc

$ mhparam -nocomponent AliasFile rmmproc
aliases
rmmproc

$ mhparam path nonexistent context
Path: Mail
context: context

$ mhparam version
nmh-1.8

$ mhparam etcdir
/etc/nmh

$ mhparam libexecdir
/usr/lib/mh

$ mhparam spoollocking
fcntl

$ mhparam datalocking
fcntl

$ mhparam sasl
cyrus_sasl

$ mhparam tls
tls

$ mhparam iconv
iconv

$ mhparam oauth
oauth

And mhparam is also super useful in backquoted operations, iykyk:

$ fgrep cornell.edu `mhpath +`/`mhparam aliasfile`

πŸŽ€ EXIT STATUS πŸŽ€

The exit status is zero if all components are found, or one if any are missing. So like, one missing component and the whole vibe is off. 😭


πŸ“ FILES πŸ“

  • $HOME/.mh_profile β€” the user profile
  • or $MH β€” rather than the standard profile
  • <mh-dir>/context β€” the user context
  • or $MHCONTEXT β€” rather than the standard context

πŸ‘‘ PROFILE COMPONENTS πŸ‘‘

  • context: β€” to determine the context file

🌈 SEE ALSO 🌈


πŸ’œ DEFAULTS πŸ’œ

  • -nocomponent if only one component is specified
  • -component if more than one component is specified
  • components defaults to none

🧚 CONTEXT 🧚

None. Yeah, nothing. Empty. A clean slate bestie. ✨


okay that's the whole page, no cap πŸ’… thanks for reading all the way to the end, you're literally the main character for that

nmh-1.8 Β· 2017-02-18 β€” mwah, love u, go print some components πŸ«ΆπŸ’–

πŸ“¦ where this page comes from