SpoolFile = mutt_str_strdup(buffer);
}
- p = mutt_str_getenv("MAILCAPS");
- if (p)
- MailcapPath = mutt_str_strdup(p);
- else
- {
- /* Default search path from RFC1524 */
- MailcapPath = mutt_str_strdup(
- "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR
- "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
- }
-
Tmpdir = mutt_str_strdup((p = mutt_str_getenv("TMPDIR")) ? p : "/tmp");
p = mutt_str_getenv("VISUAL");
if (!get_hostname())
return 1;
+ /* "$mailcap_path" precedence: environment, config file, code */
+ const char *env_mc = mutt_str_getenv("MAILCAPS");
+ if (env_mc)
+ mutt_str_replace(&MailcapPath, env_mc);
+
if (need_pause && !OPT_NO_CURSES)
{
log_queue_flush(log_disp_terminal);
** .pp
** When $$mail_check_stats is \fIset\fP, this variable configures
** how often (in seconds) NeoMutt will update message counts.
+ ** .pp
+ ** The default search path is from RFC1524.
*/
- { "mailcap_path", DT_STRING, R_NONE, &MailcapPath, 0 },
+ { "mailcap_path", DT_STRING, R_NONE, &MailcapPath, IP "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" },
/*
** .pp
** This variable specifies which files to consult when attempting to
** display MIME bodies not directly supported by NeoMutt.
+ ** .pp
+ ** $$mailcap_path is overridden by the environment variable \fC$$$MAILCAPS\fP.
*/
{ "mailcap_sanitize", DT_BOOL, R_NONE, &MailcapSanitize, 1 },
/*