Expand description
RFC 1524 mailcap, read the way mutt reads it for auto_view: a
[filters] entry with an empty command means “the command is in
my mailcap”, and only a copiousoutput entry can answer, since
that is the one promising plain text on stdout rather than a
window of its own.
The files are $MAILCAPS (colon-separated) when it is set, and
otherwise mutt’s default list: ~/.mailcap, /etc/mailcap,
/usr/etc/mailcap, /usr/local/etc/mailcap, in that order. The
first entry that matches a type wins, text/* wildcards included.
Structs§
- Entry
- One mailcap line: the type it handles, the view command, and the flags rmut cares about.
Functions§
- command_
for - The command that renders
mimetypeinline, or None when no entry can: mutt takes the first matchingcopiousoutputentry whosetestpasses. An entry wanting the terminal, or one interpolating a%{parameter}rmut does not have, is passed over. - load
- Every entry from every readable mailcap file, in search order. A missing file is not an error, like mutt.
- parse
- Parse one mailcap file.
- paths
- The mailcap files to consult, in order.
- viewer_
for - The viewer for
mimetype, mutt’s view-mailcap: the first matching entry whosetestpasses, terminal-wanting or not, with whether it writes to stdout (copiousoutput) rather than the terminal.