109 for (
size_t i = 0;
MenuNames[i].name; i++)
115 for (
int j = 0; fns[j].
name; j++)
225 int lineno = 0, rc = 0, warnings = 0;
227 struct Buffer *linebuf = NULL;
229 char *currentline = NULL;
240 bool ispipe = rcfile[rcfilelen - 1] ==
'|';
247 mutt_error(
_(
"Error: Can't build path of '%s'"), rcfile_path);
260 mutt_error(
_(
"Error: Cyclic sourcing of configuration file '%s'"), rcfile);
272 buf_printf(err,
"%s: %s", rcfile, strerror(errno));
282 const bool conv = c_config_charset && c_charset;
339 buf_printf(err, (rc >= -
MAX_ERRS) ?
_(
"source: errors in %s") :
_(
"source: reading aborted due to too many errors in %s"),
348 buf_printf(err, ngettext(
"source: %d warning in %s",
"source: %d warnings in %s", warnings),
597 if ((res && (cmd->
data == 0)) || (!res && (cmd->
data == 1)))
693 const char *label,
enum TriBool poll,
697 mailbox, label ? label :
"[NONE]",
698 (poll ==
TB_UNSET) ?
"[UNSPECIFIED]" :
701 (notify ==
TB_UNSET) ?
"[UNSPECIFIED]" :
716 bool new_account =
false;
827 bool label_set =
false;
840 buf_printf(err,
_(
"%s: too few arguments"),
"mailboxes -label");
893 label_set ?
buf_string(label) : NULL, poll, notify, err);
930 if (!p || (*p !=
':'))
1009 return strcmp(*(
const char **) a, *(
const char **) b);
1023 struct Buffer *tempfile = NULL;
1029 bool prefix =
false;
1059 fprintf(fp_out,
"%s\n", *env);
1078 if (*line->
dptr ==
'?')
1085 buf_printf(err,
_(
"Can't query option with the '%s' command"), cmd->
name);
1095 if (*line->
dptr ==
'?')
1099 buf_printf(err,
_(
"Can't query option with the '%s' command"), cmd->
name);
1105 buf_printf(err,
_(
"Can't use a prefix when querying a variable"));
1116 while (envp && *envp)
1154 if (*line->
dptr ==
'=')
1297 struct Buffer *templ = NULL;
1534 mutt_warning(
_(
"tag transform '%s' already registered as '%s'"),
1721 struct ListNode *np = NULL, *tmp = NULL;
1741 if (
buf_at(token, l - 1) ==
':')
1947 N_(
"Define an alias (name to email address)"),
1948 N_(
"alias [ -group <name> ... ] <key> <address> [, <address> ... ]"),
1949 "configuration.html#alias" },
1951 N_(
"Define a list of alternate email addresses for the user"),
1952 N_(
"alternates [ -group <name> ... ] <regex> [ <regex> ... ]"),
1953 "configuration.html#alternates" },
1955 N_(
"Set preference order for multipart alternatives"),
1956 N_(
"alternative_order <mime-type>[/<mime-subtype> ] [ <mime-type>[/<mime-subtype> ] ... ]"),
1957 "mimesupport.html#alternative-order" },
1959 N_(
"Set attachment counting rules"),
1960 N_(
"attachments { + | - }<disposition> <mime-type> [ <mime-type> ... ] | ?"),
1961 "mimesupport.html#attachments" },
1963 N_(
"Automatically display specified MIME types inline"),
1964 N_(
"auto_view <mime-type>[/<mime-subtype> ] [ <mime-type>[/<mime-subtype> ] ... ]"),
1965 "mimesupport.html#auto-view" },
1967 N_(
"Change NeoMutt's current working directory"),
1968 N_(
"cd [ <directory> ]"),
1969 "configuration.html#cd" },
1971 N_(
"Define colors for the user interface"),
1972 N_(
"color <object> [ <attribute> ... ] <foreground> <background> [ <regex> [ <num> ]]"),
1973 "configuration.html#color" },
1975 N_(
"Print a message to the status line"),
1976 N_(
"echo <message>"),
1977 "advancedusage.html#echo" },
1979 N_(
"Stop reading current config file"),
1981 "optionalfeatures.html#ifdef" },
1983 N_(
"Add addresses to an address group"),
1984 N_(
"group [ -group <name> ... ] { -rx <regex> ... | -addr <address> ... }"),
1985 "configuration.html#addrgroup" },
1987 N_(
"Define custom order of headers displayed"),
1988 N_(
"hdr_order <header> [ <header> ... ]"),
1989 "configuration.html#hdr-order" },
1991 N_(
"Conditionally include config commands if symbol defined"),
1992 N_(
"ifdef <symbol> '<config-command> [ <args> ... ]'"),
1993 "optionalfeatures.html#ifdef" },
1995 N_(
"Conditionally include if symbol is not defined"),
1996 N_(
"ifndef <symbol> '<config-command> [ <args> ... ]'"),
1997 "optionalfeatures.html#ifdef" },
1999 N_(
"Hide specified headers when displaying messages"),
2000 N_(
"ignore { * | <string> ... }"),
2001 "configuration.html#ignore" },
2003 N_(
"Add address to the list of mailing lists"),
2004 N_(
"lists [ -group <name> ... ] <regex> [ <regex> ... ]"),
2005 "configuration.html#lists" },
2007 N_(
"Define a list of mailboxes to watch"),
2008 N_(
"mailboxes [[ -label <label> ] | -nolabel ] [[ -notify | -nonotify ] [ -poll | -nopoll ] <mailbox> ] [ ... ]"),
2009 "configuration.html#mailboxes" },
2011 N_(
"Permit specific header-fields in mailto URL processing"),
2012 N_(
"mailto_allow { * | <header-field> ... }"),
2013 "configuration.html#mailto-allow" },
2015 N_(
"Map specified MIME types/subtypes to display handlers"),
2016 N_(
"mime_lookup <mime-type>[/<mime-subtype> ] [ <mime-type>[/<mime-subtype> ] ... ]"),
2017 "mimesupport.html#mime-lookup" },
2019 N_(
"**Deprecated**: Use `color`"),
2020 N_(
"mono <object> <attribute> [ <pattern> | <regex> ]"),
2021 "configuration.html#color-mono" },
2023 N_(
"Add a custom header to outgoing messages"),
2024 N_(
"my_hdr <string>"),
2025 "configuration.html#my-hdr" },
2027 N_(
"Define a list of labelled mailboxes to watch"),
2028 N_(
"named-mailboxes <description> <mailbox> [ <description> <mailbox> ... ]"),
2029 "configuration.html#mailboxes" },
2031 N_(
"Remove a spam detection rule"),
2032 N_(
"nospam { * | <regex> }"),
2033 "configuration.html#spam" },
2035 N_(
"Reset a config option to its initial value"),
2036 N_(
"reset <variable> [ <variable> ... ]"),
2037 "configuration.html#set" },
2039 N_(
"Set a score value on emails matching a pattern"),
2040 N_(
"score <pattern> <value>"),
2041 "configuration.html#score-command" },
2043 N_(
"Set a config variable"),
2044 N_(
"set { [ no | inv | & ] <variable> [?] | <variable> [=|+=|-=] value } [ ... ]"),
2045 "configuration.html#set" },
2047 N_(
"Set an environment variable"),
2048 N_(
"setenv { <variable>? | <variable> <value> }"),
2049 "advancedusage.html#setenv" },
2051 N_(
"Read and execute commands from a config file"),
2052 N_(
"source <filename>"),
2053 "configuration.html#source" },
2055 N_(
"Define rules to parse spam detection headers"),
2056 N_(
"spam <regex> <format>"),
2057 "configuration.html#spam" },
2059 N_(
"Apply regex-based rewriting to message subjects"),
2060 N_(
"subjectrx <regex> <replacement>"),
2061 "advancedusage.html#display-munging" },
2063 N_(
"Add address to the list of subscribed mailing lists"),
2064 N_(
"subscribe [ -group <name> ... ] <regex> [ <regex> ... ]"),
2065 "configuration.html#lists" },
2067 N_(
"Define expandos tags"),
2068 N_(
"tag-formats <tag> <format-string> { tag format-string ... }"),
2069 "optionalfeatures.html#custom-tags" },
2071 N_(
"Rules to transform tags into icons"),
2072 N_(
"tag-transforms <tag> <transformed-string> { tag transformed-string ... }"),
2073 "optionalfeatures.html#custom-tags" },
2075 N_(
"Toggle the value of a boolean/quad config option"),
2076 N_(
"toggle <variable> [ <variable> ... ]"),
2077 "configuration.html#set" },
2079 N_(
"Remove an alias definition"),
2080 N_(
"unalias [ -group <name> ... ] { * | <key> ... }"),
2081 "configuration.html#alias" },
2083 N_(
"Remove addresses from `alternates` list"),
2084 N_(
"unalternates [ -group <name> ... ] { * | <regex> ... }"),
2085 "configuration.html#alternates" },
2087 N_(
"Remove MIME types from preference order"),
2088 N_(
"unalternative_order { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
2089 "mimesupport.html#alternative-order" },
2091 N_(
"Remove attachment counting rules"),
2092 N_(
"unattachments { * | { + | - }<disposition> <mime-type> [ <mime-type> ... ] }"),
2093 "mimesupport.html#attachments" },
2095 N_(
"Remove MIME types from `auto_view` list"),
2096 N_(
"unauto_view { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
2097 "mimesupport.html#auto-view" },
2099 N_(
"Remove a `color` definition"),
2100 N_(
"uncolor <object> { * | <pattern> ... }"),
2101 "configuration.html#color" },
2103 N_(
"Remove addresses from an address `group`"),
2104 N_(
"ungroup [ -group <name> ... ] { * | -rx <regex> ... | -addr <address> ... }"),
2105 "configuration.html#addrgroup" },
2107 N_(
"Remove header from `hdr_order` list"),
2108 N_(
"unhdr_order { * | <header> ... }"),
2109 "configuration.html#hdr-order" },
2111 N_(
"Remove a header from the `hdr_order` list"),
2112 N_(
"unignore { * | <string> ... }"),
2113 "configuration.html#ignore" },
2115 N_(
"Remove address from the list of mailing lists"),
2116 N_(
"unlists [ -group <name> ... ] { * | <regex> ... }"),
2117 "configuration.html#lists" },
2119 N_(
"Remove mailboxes from the watch list"),
2120 N_(
"unmailboxes { * | <mailbox> ... }"),
2121 "configuration.html#mailboxes" },
2123 N_(
"Disallow header-fields in mailto processing"),
2124 N_(
"unmailto_allow { * | <header-field> ... }"),
2125 "configuration.html#mailto-allow" },
2127 N_(
"Remove custom MIME-type handlers"),
2128 N_(
"unmime_lookup { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
2129 "mimesupport.html#mime-lookup" },
2131 N_(
"**Deprecated**: Use `uncolor`"),
2132 N_(
"unmono <object> { * | <pattern> ... }"),
2133 "configuration.html#color-mono" },
2135 N_(
"Remove a header previously added with `my_hdr`"),
2136 N_(
"unmy_hdr { * | <field> ... }"),
2137 "configuration.html#my-hdr" },
2139 N_(
"Remove scoring rules for matching patterns"),
2140 N_(
"unscore { * | <pattern> ... }"),
2141 "configuration.html#score-command" },
2143 N_(
"Reset a config option to false/empty"),
2144 N_(
"unset <variable> [ <variable> ... ]"),
2145 "configuration.html#set" },
2147 N_(
"Unset an environment variable"),
2148 N_(
"unsetenv <variable>"),
2149 "advancedusage.html#setenv" },
2151 N_(
"Remove subject-rewriting rules"),
2152 N_(
"unsubjectrx { * | <regex> }"),
2153 "advancedusage.html#display-munging" },
2155 N_(
"Remove address from the list of subscribed mailing lists"),
2156 N_(
"unsubscribe [ -group <name> ... ] { * | <regex> ... }"),
2157 "configuration.html#lists" },
2159 N_(
"Show NeoMutt version and build information"),
2161 "configuration.html#version" },
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
int mutt_addrlist_parse2(struct AddressList *al, const char *s)
Parse a list of email addresses.
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
Alternate address handling.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_FREE(head)
Release all memory.
GUI display the mailboxes in a side panel.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
char buf_at(const struct Buffer *buf, size_t offset)
Return the character at the given offset.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Color and attribute parsing.
const struct Mapping ColorFields[]
Mapping of colour names to their IDs.
#define CF_NO_FLAGS
No flags are set.
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
@ MUTT_CMD_FINISH
Finish: Stop processing this file.
static const struct Command MuttCommands[]
General NeoMutt Commands.
static enum CommandResult mailbox_add(const char *folder, const char *mailbox, const char *label, enum TriBool poll, enum TriBool notify, struct Buffer *err)
Add a new Mailbox.
static bool is_color_object(const char *name)
Is the argument a neomutt colour?
GroupState
Type of email address group.
@ GS_RX
Entry is a regular expression.
@ GS_NONE
Group is missing an argument.
@ GS_ADDR
Entry is an address.
enum CommandResult parse_rc_line_cwd(const char *line, char *cwd, struct Buffer *err)
Parse and run a muttrc line in a relative directory.
void source_stack_cleanup(void)
Free memory from the stack used for the source command.
int parse_grouplist(struct GroupList *gl, struct Buffer *token, struct Buffer *line, struct Buffer *err, struct HashTable *groups)
Parse a group context.
bool commands_init(void)
Initialize commands array and register default commands.
static void do_unmailboxes_star(void)
Remove all Mailboxes from the Sidebar/notifications.
static struct ListHead MuttrcStack
LIFO designed to contain the list of config files that have been sourced and avoid cyclic sourcing.
enum CommandResult set_dump(enum GetElemListFlags flags, struct Buffer *err)
Dump list of config variables into a file/pager.
TriBool
Tri-state boolean.
@ TB_FALSE
Value is false.
@ TB_UNSET
Value hasn't been set.
bool mailbox_add_simple(const char *mailbox, struct Buffer *err)
Add a new Mailbox.
static void do_unmailboxes(struct Mailbox *m)
Remove a Mailbox from the Sidebar/notifications.
int source_rc(const char *rcfile_path, struct Buffer *err)
Read an initialization file.
char * mutt_get_sourced_cwd(void)
Get the current file path that is being parsed.
static bool is_function(const char *name)
Is the argument a neomutt function?
Functions to parse commands in a config file.
bool dump_config(struct ConfigSet *cs, struct HashElemArray *hea, ConfigDumpFlags flags, FILE *fp)
Write all the config to a file.
#define CS_DUMP_NO_FLAGS
No flags are set.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
bool StartupComplete
When the config has been read.
const char * cc_charset(void)
Get the cached value of $charset.
void account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
const struct Command * commands_get(struct CommandArray *ca, const char *name)
Get a Command by its name.
Convenience wrapper for the core headers.
int mailbox_gen(void)
Get the next generation number.
struct Mailbox * mailbox_new(void)
Create a new Mailbox.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
void mutt_endwin(void)
Shutdown curses.
void header_free(struct ListHead *hdrlist, struct ListNode *target)
Free and remove a header from a header list.
struct ListNode * header_add(struct ListHead *hdrlist, const char *header)
Add a header to a list.
struct ListNode * header_update(struct ListNode *hdr, const char *header)
Update an existing header.
struct ListNode * header_find(const struct ListHead *hdrlist, const char *header)
Find a header, matching on its field, in a list of headers.
struct ReplaceList SpamList
List of regexes to match subscribed mailing lists.
struct RegexList SubscribedLists
List of header patterns to unignore (see)
struct HashTable * AutoSubscribeCache
< Hash Table: "mailto:" -> AutoSubscribeCache
struct RegexList UnSubscribedLists
struct RegexList UnMailLists
List of regexes to exclude false matches in SubscribedLists.
struct RegexList MailLists
List of permitted fields in a mailto: url.
struct ListHead MailToAllow
List of regexes to identify non-spam emails.
struct ListHead Ignore
List of regexes to match mailing lists.
struct RegexList NoSpamList
List of regexes and patterns to match spam emails.
struct ListHead UnIgnore
List of regexes to exclude false matches in MailLists.
Structs that make up an email.
@ NT_HEADER_CHANGE
An existing header has been changed.
@ NT_HEADER_ADD
Header has been added.
@ NT_HEADER_DELETE
Header has been removed.
bool envlist_set(char ***envp, const char *name, const char *value, bool overwrite)
Set an environment variable.
bool envlist_unset(char ***envp, const char *name)
Unset an environment variable.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
#define MUTT_RL_CONT
-continuation
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
struct ListHead MimeLookupList
List of mime types that that shouldn't use the mailcap entry.
struct ListHead AlternativeOrderList
List of preferred mime types to display.
struct ListHead AutoViewList
List of mime types to auto view.
bool OptForceRefresh
(pseudo) refresh even during macros
struct ListHead UserHeader
List of custom headers to add to outgoing emails.
struct ListHead HeaderOrderList
List of header fields in the order they should be displayed.
int grouplist_add_regex(struct GroupList *gl, const char *str, uint16_t flags, struct Buffer *err)
Add matching Addresses to a GroupList.
int groups_remove_addrlist(struct HashTable *groups, struct GroupList *gl, struct AddressList *al)
Remove an AddressList from a GroupList.
void groups_remove_grouplist(struct HashTable *groups, struct GroupList *gl)
Clear a GroupList.
int groups_remove_regex(struct HashTable *groups, struct GroupList *gl, const char *str)
Remove matching addresses from a GroupList.
struct Group * groups_get_group(struct HashTable *groups, const char *name)
Get a Group by its name.
void grouplist_add_addrlist(struct GroupList *gl, struct AddressList *al)
Add Address list to a GroupList.
void grouplist_add_group(struct GroupList *gl, struct Group *g)
Add a Group to a GroupList.
void grouplist_destroy(struct GroupList *gl)
Free a GroupList.
#define MUTT_GROUP
'group' config command
#define MUTT_UNGROUP
'ungroup' config command
enum CommandResult parse_unsubscribe_from(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unsubscribe-from' command - Implements Command::parse() -.
enum CommandResult parse_cd(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'cd' command - Implements Command::parse() -.
enum CommandResult parse_tag_formats(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'tag-formats' command - Implements Command::parse() -.
enum CommandResult parse_unscore(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unscore' command - Implements Command::parse() -.
enum CommandResult parse_alias(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'alias' command - Implements Command::parse() -.
enum CommandResult parse_lists(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'lists' command - Implements Command::parse() -.
enum CommandResult parse_finish(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'finish' command - Implements Command::parse() -.
enum CommandResult parse_version(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'version' command - Implements Command::parse() -.
enum CommandResult parse_unsubjectrx_list(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unsubjectrx' command - Implements Command::parse() -.
enum CommandResult parse_unmy_hdr(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unmy_hdr' command - Implements Command::parse() -.
enum CommandResult parse_score(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'score' command - Implements Command::parse() -.
enum CommandResult parse_attachments(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'attachments' command - Implements Command::parse() -.
enum CommandResult parse_unmailboxes(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unmailboxes' command - Implements Command::parse() -.
enum CommandResult parse_unlists(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unlists' command - Implements Command::parse() -.
enum CommandResult parse_ignore(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'ignore' command - Implements Command::parse() -.
enum CommandResult parse_subscribe(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'subscribe' command - Implements Command::parse() -.
enum CommandResult parse_ifdef(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'ifdef' and 'ifndef' commands - Implements Command::parse() -.
enum CommandResult parse_alternates(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'alternates' command - Implements Command::parse() -.
enum CommandResult parse_source(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'source' command - Implements Command::parse() -.
enum CommandResult parse_my_hdr(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'my_hdr' command - Implements Command::parse() -.
enum CommandResult parse_set(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'set' family of commands - Implements Command::parse() -.
enum CommandResult parse_unalias(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unalias' command - Implements Command::parse() -.
enum CommandResult parse_nospam(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'nospam' command - Implements Command::parse() -.
enum CommandResult parse_mono(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'mono' command - Implements Command::parse() -.
enum CommandResult parse_stailq(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse a list command - Implements Command::parse() -.
enum CommandResult parse_unsubscribe(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unsubscribe' command - Implements Command::parse() -.
enum CommandResult parse_unmono(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unmono' command - Implements Command::parse() -.
enum CommandResult parse_group(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'group' and 'ungroup' commands - Implements Command::parse() -.
enum CommandResult parse_setenv(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'setenv' and 'unsetenv' commands - Implements Command::parse() -.
enum CommandResult parse_unignore(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unignore' command - Implements Command::parse() -.
enum CommandResult parse_unstailq(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse an unlist command - Implements Command::parse() -.
enum CommandResult parse_spam(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'spam' command - Implements Command::parse() -.
enum CommandResult parse_echo(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'echo' command - Implements Command::parse() -.
enum CommandResult parse_tag_transforms(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'tag-transforms' command - Implements Command::parse() -.
enum CommandResult parse_unalternates(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unalternates' command - Implements Command::parse() -.
enum CommandResult parse_unattachments(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'unattachments' command - Implements Command::parse() -.
enum CommandResult parse_color(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'color' command - Implements Command::parse() -.
enum CommandResult parse_uncolor(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'uncolor' command - Implements Command::parse() -.
enum CommandResult parse_subscribe_to(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'subscribe-to' command - Implements Command::parse() -.
enum CommandResult parse_subjectrx_list(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'subjectrx' command - Implements Command::parse() -.
enum CommandResult parse_mailboxes(const struct Command *cmd, struct Buffer *line, struct Buffer *err)
Parse the 'mailboxes' command - Implements Command::parse() -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
static int envlist_sort(const void *a, const void *b, void *sdata)
Compare two environment strings - Implements sort_t -.
Convenience wrapper for the gui headers.
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
void mutt_hash_free(struct HashTable **ptr)
Free a hash table.
int imap_subscribe(const char *path, bool subscribe)
Subscribe to a mailbox.
const struct MenuFuncOp * km_get_table(enum MenuType mtype)
Lookup a Menu's functions.
struct ListNode * mutt_list_insert_head(struct ListHead *h, char *s)
Insert a string at the beginning of a List.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
@ LL_DEBUG2
Log at debug level 2.
@ LL_DEBUG1
Log at debug level 1.
@ LL_NOTIFY
Log of notifications.
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
int mutt_monitor_add(struct Mailbox *m)
Add a watch for a mailbox.
int mutt_monitor_remove(struct Mailbox *m)
Remove a watch for a mailbox.
Monitor files for changes.
int mutt_ch_convert_string(char **ps, const char *from, const char *to, uint8_t flags)
Convert a string between encodings.
#define MUTT_ICONV_NO_FLAGS
No flags are set.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
void notify_free(struct Notify **ptr)
Free a notification handler.
bool mutt_path_to_absolute(char *path, const char *reference)
Convert a relative path to its absolute form.
const char * mutt_path_getcwd(struct Buffer *cwd)
Get the current working directory.
int mutt_replacelist_remove(struct ReplaceList *rl, const char *pat)
Remove a pattern from a list.
void mutt_regexlist_free(struct RegexList *rl)
Free a RegexList object.
int mutt_regexlist_add(struct RegexList *rl, const char *str, uint16_t flags, struct Buffer *err)
Compile a regex string and add it to a list.
void mutt_replacelist_free(struct ReplaceList *rl)
Free a ReplaceList object.
int mutt_regexlist_remove(struct RegexList *rl, const char *str)
Remove a Regex from a list.
int mutt_replacelist_add(struct ReplaceList *rl, const char *pat, const char *templ, struct Buffer *err)
Add a pattern and a template to a list.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
bool mutt_istrn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings ignoring case (to a maximum), safely.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
void remove_from_stailq(struct ListHead *head, const char *str)
Remove an item, matching a string, from a List.
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
void mutt_sleep(short s)
Sleep for a while.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
FILE * mutt_open_read(const char *path, pid_t *thepid)
Run a command to read from.
Some miscellaneous functions.
struct Mailbox * mx_mbox_find(struct Account *a, const char *path)
Find a Mailbox on an Account.
bool mx_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Wrapper for MxOps::ac_add()
struct Account * mx_ac_find(struct Mailbox *m)
Find the Account owning a Mailbox.
int mx_path_canon2(struct Mailbox *m, const char *folder)
Canonicalise the path to realpath.
struct MailboxArray neomutt_mailboxes_get(struct NeoMutt *n, enum MailboxType type)
Get an Array of matching Mailboxes.
bool neomutt_account_add(struct NeoMutt *n, struct Account *a)
Add an Account to the global list.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_HEADER
A header has changed, NotifyHeader EventHeader.
@ MUTT_SET_INV
default is to invert all vars
@ MUTT_SET_SET
default is to set all vars
@ MUTT_SET_RESET
default is to reset all vars to default
@ MUTT_SET_UNSET
default is to unset all vars
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
#define STAILQ_REMOVE_HEAD(head, field)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
#define TAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_EMPTY(head)
enum CommandResult parse_rc_line(struct Buffer *line, struct Buffer *err)
Parse a line of user config.
Routines for adding user scores to emails.
bool store_is_valid_backend(const char *str)
Is the string a valid Store backend.
A group of associated Mailboxes.
enum MailboxType type
Type of Mailboxes this Account contains.
char * name
Name of Account.
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
struct ConfigSubset * sub
Inherited config items.
String manipulation buffer.
char * dptr
Current read/write position.
char * data
Pointer to data.
intptr_t data
Data or flags to pass to the command.
const char * name
Name of the command.
Container for lots of config items.
struct ConfigSet * cs
Parent ConfigSet.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
The Mailbox this Event relates to.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
enum MailboxType type
Mailbox type.
bool poll_new_mail
Check for new mail.
char * name
A short name for the Mailbox.
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
bool notify_user
Notify the user of new mail.
struct Buffer pathbuf
Path of the Mailbox.
struct Account * account
Account that owns this Mailbox.
bool visible
True if a result of "mailboxes".
int opened
Number of times mailbox is opened.
int gen
Generation number, for sorting.
Container for Accounts, Notifications.
struct AccountArray accounts
All Accounts.
struct CommandArray commands
NeoMutt commands.
char ** env
Private copy of the environment variables.
char * home_dir
User's home directory.
struct Notify * notify
Notifications handler.
struct HashTable * groups
Hash Table: "group-name" -> Group.
struct ConfigSubset * sub
Inherited config items.
struct HashElemArray get_elem_list(struct ConfigSet *cs, enum GetElemListFlags flags)
Create a sorted list of all config items.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
struct HashElem * cs_subset_lookup(const struct ConfigSubset *sub, const char *name)
Find an inherited config item.
GetElemListFlags
Flags for get_elem_list()
const struct Mapping MenuNames[]
Menu name lookup table.
bool print_version(FILE *fp, bool use_ansi)
Print system and compile info to a file.
bool feature_enabled(const char *name)
Test if a compile-time feature is enabled.
Display version and copyright about NeoMutt.