alias key address [ , address, ... ]
It's usually very cumbersome to remember or type out the address of someone you are communicating with. Mutt allows you to create ``aliases'' which map a short string to a full address.
Note: if you want to create an alias for a group (by specifying more than one address), you must separate the addresses with a comma (``,'').
To remove an alias or aliases (``*'' means all aliases):
unalias [ * | key ... ]
alias muttdude firstname.lastname@example.org (Michael Elkins) alias theguys manny, moe, jack
Unlike other mailers, Mutt doesn't require aliases to be defined
in a special file. The
alias command can appear anywhere in
a configuration file, as long as this file is
sourced. Consequently, you can have multiple alias files, or
you can have all aliases defined in your muttrc.
On the other hand, the
function can use only one file, the one pointed to by the
$alias_file variable (which is
~/.muttrc by default). This file is not special either,
in the sense that Mutt will happily append aliases to any file, but in
order for the new aliases to take effect you need to explicitly
source this file too.
source /usr/local/share/Mutt.aliases source ~/.mail_aliases set alias_file=~/.mail_aliases
To use aliases, you merely use the alias at any place in mutt where mutt prompts for addresses, such as the To: or Cc: prompt. You can also enter aliases in your editor at the appropriate headers if you have the $edit_headers variable set.
In addition, at the various address prompts, you can use the tab character to expand a partial alias to the full alias. If there are multiple matches, mutt will bring up a menu with the matching aliases. In order to be presented with the full list of aliases, you must hit tab with out a partial alias, such as at the beginning of the prompt or after a comma denoting multiple addresses.
In the alias menu, you can select as many aliases as you want with the select-entry key (default: RET), and use the exit key (default: q) to return to the address prompt.