NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
commands.c File Reference

Handle Email commands. More...

#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "commands/lib.h"
#include "parse/lib.h"
#include "group.h"
#include "ignore.h"
#include "module_data.h"
#include "score.h"
#include "spam.h"
+ Include dependency graph for commands.c:

Go to the source code of this file.

Functions

enum CommandResult parse_list (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
 Parse a list command - Implements Command::parse() -.
 
enum CommandResult parse_unlist (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
 Parse an unlist command - Implements Command::parse() -.
 
enum CommandResult parse_tag_formats (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
 Parse the 'tag-formats' command - Implements Command::parse() -.
 
enum CommandResult parse_tag_transforms (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
 Parse the 'tag-transforms' command - Implements Command::parse() -.
 

Variables

const struct Command EmailCommands []
 Email Commands.
 

Detailed Description

Handle Email commands.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file commands.c.

Variable Documentation

◆ EmailCommands

const struct Command EmailCommands[]

Email Commands.

Definition at line 222 of file commands.c.

222 {
223 // clang-format off
224 { "alternative-order", CMD_ALTERNATIVE_ORDER, parse_list,
225 N_("Set preference order for multipart alternatives"),
226 N_("alternative-order <mime-type>[/<mime-subtype> ] [ ... ]"),
227 "mimesupport.html#alternative-order" },
228 { "auto-view", CMD_AUTO_VIEW, parse_list,
229 N_("Automatically display specified MIME types inline"),
230 N_("auto-view <mime-type>[/<mime-subtype> ] [ ... ]"),
231 "mimesupport.html#auto-view" },
232 { "group", CMD_GROUP, parse_group,
233 N_("Add addresses to an address group"),
234 N_("group [ -group <name> ... ] { -rx <regex> ... | -addr <address> ... }"),
235 "configuration.html#addrgroup" },
236 { "header-order", CMD_HEADER_ORDER, parse_list,
237 N_("Define custom order of headers displayed"),
238 N_("header-order <header> [ <header> ... ]"),
239 "configuration.html#header-order" },
240 { "ignore", CMD_IGNORE, parse_ignore,
241 N_("Hide specified headers when displaying messages"),
242 N_("ignore <string> [ <string> ...]"),
243 "configuration.html#ignore" },
244 { "lists", CMD_LISTS, parse_lists,
245 N_("Add address to the list of mailing lists"),
246 N_("lists [ -group <name> ... ] <regex> [ ... ]"),
247 "configuration.html#lists" },
248 { "mailto-allow", CMD_MAILTO_ALLOW, parse_list,
249 N_("Permit specific header-fields in mailto URL processing"),
250 N_("mailto-allow { * | <header-field> ... }"),
251 "configuration.html#mailto-allow" },
252 { "nospam", CMD_NOSPAM, parse_nospam,
253 N_("Remove a spam detection rule"),
254 N_("nospam { * | <regex> }"),
255 "configuration.html#spam" },
256 { "score", CMD_SCORE, parse_score,
257 N_("Set a score value on emails matching a pattern"),
258 N_("score <pattern> <value>"),
259 "configuration.html#score-command" },
260 { "spam", CMD_SPAM, parse_spam,
261 N_("Define rules to parse spam detection headers"),
262 N_("spam <regex> [ <format> ]"),
263 "configuration.html#spam" },
264 { "tag-formats", CMD_TAG_FORMATS, parse_tag_formats,
265 N_("Define expandos tags"),
266 N_("tag-formats <tag> <format-string> [ ... ] }"),
267 "optionalfeatures.html#custom-tags" },
268 { "tag-transforms", CMD_TAG_TRANSFORMS, parse_tag_transforms,
269 N_("Rules to transform tags into icons"),
270 N_("tag-transforms <tag> <transformed-string> [ ... ]"),
271 "optionalfeatures.html#custom-tags" },
272 { "unalternative-order", CMD_UNALTERNATIVE_ORDER, parse_unlist,
273 N_("Remove MIME types from preference order"),
274 N_("unalternative-order { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
275 "mimesupport.html#alternative-order" },
276 { "unauto-view", CMD_UNAUTO_VIEW, parse_unlist,
277 N_("Remove MIME types from `auto-view` list"),
278 N_("unauto-view { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
279 "mimesupport.html#auto-view" },
280 { "ungroup", CMD_UNGROUP, parse_group,
281 N_("Remove addresses from an address `group`"),
282 N_("ungroup [ -group <name> ... ] { * | -rx <regex> ... | -addr <address> ... }"),
283 "configuration.html#addrgroup" },
284 { "unheader-order", CMD_UNHEADER_ORDER, parse_unlist,
285 N_("Remove header from `header-order` list"),
286 N_("unheader-order { * | <header> ... }"),
287 "configuration.html#header-order" },
288 { "unignore", CMD_UNIGNORE, parse_unignore,
289 N_("Remove a header from the `header-order` list"),
290 N_("unignore { * | <string> ... }"),
291 "configuration.html#ignore" },
292 { "unlists", CMD_UNLISTS, parse_unlists,
293 N_("Remove address from the list of mailing lists"),
294 N_("unlists { * | <regex> ... }"),
295 "configuration.html#lists" },
296 { "unmailto-allow", CMD_UNMAILTO_ALLOW, parse_unlist,
297 N_("Disallow header-fields in mailto processing"),
298 N_("unmailto-allow { * | <header-field> ... }"),
299 "configuration.html#mailto-allow" },
300 { "unscore", CMD_UNSCORE, parse_unscore,
301 N_("Remove scoring rules for matching patterns"),
302 N_("unscore { * | <pattern> ... }"),
303 "configuration.html#score-command" },
304
305 // Deprecated
306 { "alternative_order", CMD_NONE, NULL, "alternative-order", NULL, NULL, CF_SYNONYM },
307 { "auto_view", CMD_NONE, NULL, "auto-view", NULL, NULL, CF_SYNONYM },
308 { "hdr_order", CMD_NONE, NULL, "header-order", NULL, NULL, CF_SYNONYM },
309 { "mailto_allow", CMD_NONE, NULL, "mailto-allow", NULL, NULL, CF_SYNONYM },
310 { "unalternative_order", CMD_NONE, NULL, "unalternative-order", NULL, NULL, CF_SYNONYM },
311 { "unauto_view", CMD_NONE, NULL, "unauto-view", NULL, NULL, CF_SYNONYM },
312 { "unhdr_order", CMD_NONE, NULL, "unheader-order", NULL, NULL, CF_SYNONYM },
313 { "unmailto_allow", CMD_NONE, NULL, "unmailto-allow", NULL, NULL, CF_SYNONYM },
314
315 { NULL, CMD_NONE, NULL, NULL, NULL, NULL, CF_NO_FLAGS },
316 // clang-format on
317};
#define CF_SYNONYM
Command is a synonym for another command.
Definition command.h:49
#define CF_NO_FLAGS
No flags are set.
Definition command.h:48
@ CMD_SPAM
:spam
Definition command.h:114
@ CMD_IGNORE
:ignore
Definition command.h:85
@ CMD_GROUP
:group
Definition command.h:79
@ CMD_TAG_TRANSFORMS
:tag-transforms
Definition command.h:120
@ CMD_SCORE
:score
Definition command.h:105
@ CMD_MAILTO_ALLOW
:mailto-allow
Definition command.h:92
@ CMD_LISTS
:lists
Definition command.h:87
@ CMD_AUTO_VIEW
:auto-view
Definition command.h:66
@ CMD_UNALTERNATIVE_ORDER
:unalternative-order
Definition command.h:125
@ CMD_UNAUTO_VIEW
:unauto-view
Definition command.h:127
@ CMD_UNHEADER_ORDER
:unheader-order
Definition command.h:131
@ CMD_NOSPAM
:nospam
Definition command.h:99
@ CMD_UNGROUP
:ungroup
Definition command.h:130
@ CMD_NONE
No Command.
Definition command.h:59
@ CMD_TAG_FORMATS
:tag-formats
Definition command.h:119
@ CMD_UNIGNORE
:unignore
Definition command.h:133
@ CMD_UNLISTS
:unlists
Definition command.h:134
@ CMD_ALTERNATIVE_ORDER
:alternative-order
Definition command.h:63
@ CMD_UNSCORE
:unscore
Definition command.h:141
@ CMD_HEADER_ORDER
:header-order
Definition command.h:80
@ CMD_UNMAILTO_ALLOW
:unmailto-allow
Definition command.h:137
enum CommandResult parse_tag_transforms(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'tag-transforms' command - Implements Command::parse() -.
Definition commands.c:175
enum CommandResult parse_nospam(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'nospam' command - Implements Command::parse() -.
Definition spam.c:51
enum CommandResult parse_unlist(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse an unlist command - Implements Command::parse() -.
Definition commands.c:87
enum CommandResult parse_tag_formats(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'tag-formats' command - Implements Command::parse() -.
Definition commands.c:124
enum CommandResult parse_unlists(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unlists' command - Implements Command::parse() -.
Definition group.c:288
enum CommandResult parse_lists(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'lists' command - Implements Command::parse() -.
Definition group.c:188
enum CommandResult parse_group(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'group' and 'ungroup' commands - Implements Command::parse() -.
Definition group.c:90
enum CommandResult parse_unscore(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unscore' command - Implements Command::parse() -.
Definition score.c:146
enum CommandResult parse_unignore(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unignore' command - Implements Command::parse() -.
Definition ignore.c:83
enum CommandResult parse_spam(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'spam' command - Implements Command::parse() -.
Definition spam.c:113
enum CommandResult parse_ignore(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'ignore' command - Implements Command::parse() -.
Definition ignore.c:50
enum CommandResult parse_score(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'score' command - Implements Command::parse() -.
Definition score.c:57
enum CommandResult parse_list(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse a list command - Implements Command::parse() -.
Definition commands.c:51
#define N_(a)
Definition message.h:32