Skip to main content

Module alias

Module alias 

Source
Expand description

Mutt-style address aliases: lines of alias nick expansion... read from $RMUT_ALIASES or ~/.config/rmut/aliases.

Functions§

append_to
Append alias nick expansion to the alias file (create-alias), creating the file if needed. A repeated nick wins by coming later. Returns the path written. The same, into the file the config names.
complete
Completion candidates for a partial address: expansions of every alias whose nick starts with word (case-insensitive), then query_command results, sorted and deduplicated.
default_path
expand
Expand comma-separated recipients; a bare token exactly matching an alias nick is replaced by its expansion.
load
The aliases in the file the config names, or the default one.
parse
path_for
The alias file: what the config names (mutt’s $alias_file), else $RMUT_ALIASES, else ~/.config/rmut/aliases. A leading ~ is the home directory, as it is everywhere else.
query
Run mutt’s query_command (%s = the search word, appended when the command has no %s) and parse its output: the first line is a human message, then one address<TAB>name[<TAB>extra] per line.