MHPARAM(1)

✨ NAME ✨

okay bestie, meet mhparam β€” the nmh glow-up tool that prints out your nmh profile and context components πŸ’… she reads your config and tells you what's in it, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, mhparam writes the value of the profile component(s) you asked for to standard output, each one separated by newlines. Component name matching is case-insensitive β€” she does not care about your capitalisation era, fr fr. And if the profile component is not present? She prints the default value instead β€” or literally nothing, if there's no default. (iconic behaviour tbh)

If you pass the -component switch, then the component name gets displayed right alongside the profile component's value. You can turn that off again with -nocomponent. 🫢

Here's the little rule that trips people up, so pay attention bestie:

  • if more than one component is specified in the components list, then -component is on by default.
  • if only one component is specified, then -nocomponent is on by default.

If -all is specified, then all components in the nmh profile get displayed, and the other arguments are ignored. Periodt. πŸ”₯

She can also hand over other info, and it's giving ✨ bonus content ✨: the nmh version identifier, the locations of the nmh bindir, libexecdir, etcdir, and docdir install directories, all proc settings, and the datalocking method described in mh-profile(5). Info about the configuration of the nmh installation is up for grabs too, including the default mail spool locking method.

Wanna know whether your configuration includes support for SASL, TLS, iconv(3), and oauth? Run these, respectively β€” a non-null string means the support is there:

mhparam sasl
mhparam tls
mhparam iconv
mhparam oauth

Conversely, no output means that support is not included. Not a single crumb. 😭 And the -debug switch displays all such other information available from mhparam. She's an open book, lowkey.

Examples, because we love receipts:

$ mhparam path
Mail

$ mhparam mhlproc
/usr/libexec/nmh/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/libexec/nmh

$ mhparam spoollocking
fcntl

$ mhparam datalocking
fcntl

$ mhparam sasl
cyrus_sasl

$ mhparam tls
tls

$ mhparam iconv
iconv

$ mhparam oauth
oauth

Also? She's the moment inside backquoted operations:

$ 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 if you script against her, check that number, bestie. πŸ™ˆ


πŸ“ 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 🌈

mh-profile(5)


πŸ‘‘ DEFAULTS πŸ‘‘

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

🧚 CONTEXT 🧚

None


and that's the whole vibe check, bestie β€” this page is from nmh-1.8, dated 2017-02-18, so go forth and mhparam responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from