MUTTPROFILE(1)

okay bestie, sit down, we're learning a whole manpage ✨ This is MUTTPROFILE(1), and it lives in the User Contributed Perl Documentation corner of your system, which is exactly the vibe you'd expect. It's a lil Perl script that picks which Mutt profile you're gonna use, and honestly? It's iconic. Let's get into it. πŸ’…


🌸 NAME 🌸

muttprofile β€” choose a Mutt profile. That's it. That's the whole job. πŸŽ€


✨ SYNOPSIS ✨

muttprofile [-a|--active string] [-d|--dir directory] [-h|--help]
[-p|--profile regexp] [-v|--view] [-V|--Version] [profile]

πŸ’– DESCRIPTION πŸ’–

So muttprofile is a simple utility whose entire purpose in life is helping you choose a profile to use with the Mutt email client. She has two operating modes: command-line, and interactive. Not me giving you options, that's literally her.

Here's the tea: muttprofile goes into interactive mode if there are no command-line arguments at all, or if -v|--view is present without a profile name. No notes. πŸ‘‘

When she's running, she goes looking for profile files inside the Mutt directory, opens them up, and hunts for the NAME and DESC definitions. Then she creates a symbolic link pointing at whichever profile the user chose. The rest of the heavy lifting? Done by a Mutt macro. Teamwork, fr fr. 🫢


πŸ¦‹ USAGE πŸ¦‹

Interactive mode:

Type the name of the profile and the program creates a symlink to load that profile. Press <tab> to complete, and press <ctrl-d> to see the list of choices. Keyboard shortcuts are giving main character energy, lowkey. ⌨️

Command-line options:

  • -a, --active β€” sets the name for the active profile symlink. The default is profile.active.
  • -d, --dir β€” sets the Mutt directory. The default is ~/.mutt.
  • -h, --help β€” prints a short help and exits. Very "just passing through" of her.
  • -p, --profile β€” a (Perl) regexp to match profile files in the Mutt directory.
  • -v, --view β€” instead of creating a symlink, just view the profile contents. Vibes only, no commitment. πŸ‘€
  • -V, --version β€” prints the version information and exits. Heads up: use --version for the long version and -V for the short version.
  • profile β€” if profile exits, create the symlink to load it from Mutt, otherwise exit with an error. 🚨

πŸŽ€ INSTALL πŸŽ€

Good news: muttprofile requires no installation. Zero. None. Slay.

But bestie, you might have to check the first line of the file (#!/usr/bin/perl -w) and change the path to perl if needed. And yes, 'which perl' might be useful here :-) β€” that smiley is from the original author, I'm just passing it along. πŸ’–


⭐ SETTING UP PROFILES ⭐

muttprofile checks the profile files for the following information:

# NAME: name for your profile
# DESC: description of your profile

This info is what gets used for choosing and displaying the available profiles. DESC is optional, but if NAME is missing, the filename gets used instead. She's flexible like that. 🧚


πŸ”₯ USING MUTTPROFILE FROM MUTT πŸ”₯

Perhaps the easiest way to invoke muttprofile from mutt is to bind a key with the mutt macro command. For example, adding this to your muttrc-file:

macro     index     <F10>     "!muttprofile\n:source
~/.mutt/profile.active\nm" "New message with profile"

...binds the function key <F10> to start muttprofile, load the profile, and start a new message. One keypress, whole workflow handled. ate and left no crumbs. ✨


πŸ’€ EXIT CODES πŸ’€

The default exit codes for muttprofile are:

0 OK
1 PROFILE ALREADY ACTIVE
2 ERROR

These codes can be used in shell scripts etc. Script girlies, she sees you. πŸ‘‘


🌈 FURTHER INFORMATION 🌈


πŸ’œ MODULES πŸ’œ

muttprofile uses the perl modules Term::Complete and Getopt::Long, and both of them come with the Perl distribution. No extra shopping required. πŸ›οΈ


πŸ‘‘ LICENCE πŸ‘‘

muttprofile is distibuted under the GNU General Public Licence (GPL), same as Mutt. For details, see http://www.gnu.org/copyleft/gpl.html.

Note: that's "distibuted" with a typo in the original β€” I'm not fixing the author's spelling, that's his legacy. 🫑

πŸ™ˆ BUGS πŸ™ˆ

None known so far. Inevitably to appear sooner or later. She's confident, but she's honest. 😭


πŸ“ VERSION πŸ“

  • 1.0.0 (current) β€” First public release.
  • 2000-05-10 β€” Martti Rahkila

🌸 AUTHOR 🌸

Martti Rahkila
martti.rahkila@iki.fi
http://www.iki.fi/martti.rahkila/mutt

πŸ¦‹ SEE ALSO πŸ¦‹

mutt(1), perl(1)


and that's the whole page, bestie πŸ’– This one came to you courtesy of perl v5.8.0 and is dated 2003-01-15 β€” so if you're reading this, you're deep in the archives and I respect it. Stay slaying, go set up your profiles, and don't forget to press <F10>. πŸŽ€βœ¨