NeoMutt  2025-12-11-911-gd8d604
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 "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 221 of file commands.c.

221 {
222 // clang-format off
223 { "alternative-order", CMD_ALTERNATIVE_ORDER, parse_list,
224 N_("Set preference order for multipart alternatives"),
225 N_("alternative-order <mime-type>[/<mime-subtype> ] [ ... ]"),
226 "mimesupport.html#alternative-order" },
227 { "auto-view", CMD_AUTO_VIEW, parse_list,
228 N_("Automatically display specified MIME types inline"),
229 N_("auto-view <mime-type>[/<mime-subtype> ] [ ... ]"),
230 "mimesupport.html#auto-view" },
231 { "header-order", CMD_HEADER_ORDER, parse_list,
232 N_("Define custom order of headers displayed"),
233 N_("header-order <header> [ <header> ... ]"),
234 "configuration.html#header-order" },
235 { "ignore", CMD_IGNORE, parse_ignore,
236 N_("Hide specified headers when displaying messages"),
237 N_("ignore <string> [ <string> ...]"),
238 "configuration.html#ignore" },
239 { "mailto-allow", CMD_MAILTO_ALLOW, parse_list,
240 N_("Permit specific header-fields in mailto URL processing"),
241 N_("mailto-allow { * | <header-field> ... }"),
242 "configuration.html#mailto-allow" },
243 { "nospam", CMD_NOSPAM, parse_nospam,
244 N_("Remove a spam detection rule"),
245 N_("nospam { * | <regex> }"),
246 "configuration.html#spam" },
247 { "score", CMD_SCORE, parse_score,
248 N_("Set a score value on emails matching a pattern"),
249 N_("score <pattern> <value>"),
250 "configuration.html#score-command" },
251 { "spam", CMD_SPAM, parse_spam,
252 N_("Define rules to parse spam detection headers"),
253 N_("spam <regex> [ <format> ]"),
254 "configuration.html#spam" },
255 { "tag-formats", CMD_TAG_FORMATS, parse_tag_formats,
256 N_("Define expandos tags"),
257 N_("tag-formats <tag> <format-string> [ ... ] }"),
258 "optionalfeatures.html#custom-tags" },
259 { "tag-transforms", CMD_TAG_TRANSFORMS, parse_tag_transforms,
260 N_("Rules to transform tags into icons"),
261 N_("tag-transforms <tag> <transformed-string> [ ... ]"),
262 "optionalfeatures.html#custom-tags" },
263 { "unalternative-order", CMD_UNALTERNATIVE_ORDER, parse_unlist,
264 N_("Remove MIME types from preference order"),
265 N_("unalternative-order { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
266 "mimesupport.html#alternative-order" },
267 { "unauto-view", CMD_UNAUTO_VIEW, parse_unlist,
268 N_("Remove MIME types from `auto-view` list"),
269 N_("unauto-view { * | [ <mime-type>[/<mime-subtype> ] ... ] }"),
270 "mimesupport.html#auto-view" },
271 { "unheader-order", CMD_UNHEADER_ORDER, parse_unlist,
272 N_("Remove header from `header-order` list"),
273 N_("unheader-order { * | <header> ... }"),
274 "configuration.html#header-order" },
275 { "unignore", CMD_UNIGNORE, parse_unignore,
276 N_("Remove a header from the `header-order` list"),
277 N_("unignore { * | <string> ... }"),
278 "configuration.html#ignore" },
279 { "unmailto-allow", CMD_UNMAILTO_ALLOW, parse_unlist,
280 N_("Disallow header-fields in mailto processing"),
281 N_("unmailto-allow { * | <header-field> ... }"),
282 "configuration.html#mailto-allow" },
283 { "unscore", CMD_UNSCORE, parse_unscore,
284 N_("Remove scoring rules for matching patterns"),
285 N_("unscore { * | <pattern> ... }"),
286 "configuration.html#score-command" },
287
288 // Deprecated
289 { "alternative_order", CMD_NONE, NULL, "alternative-order", NULL, NULL, CF_SYNONYM },
290 { "auto_view", CMD_NONE, NULL, "auto-view", NULL, NULL, CF_SYNONYM },
291 { "hdr_order", CMD_NONE, NULL, "header-order", NULL, NULL, CF_SYNONYM },
292 { "mailto_allow", CMD_NONE, NULL, "mailto-allow", NULL, NULL, CF_SYNONYM },
293 { "unalternative_order", CMD_NONE, NULL, "unalternative-order", NULL, NULL, CF_SYNONYM },
294 { "unauto_view", CMD_NONE, NULL, "unauto-view", NULL, NULL, CF_SYNONYM },
295 { "unhdr_order", CMD_NONE, NULL, "unheader-order", NULL, NULL, CF_SYNONYM },
296 { "unmailto_allow", CMD_NONE, NULL, "unmailto-allow", NULL, NULL, CF_SYNONYM },
297
298 { NULL, CMD_NONE, NULL, NULL, NULL, NULL, CF_NONE },
299 // clang-format on
300};
@ CF_SYNONYM
Command is a synonym for another command.
Definition command.h:50
@ CF_NONE
No flags are set.
Definition command.h:49
@ CMD_SPAM
:spam
Definition command.h:117
@ CMD_IGNORE
:ignore
Definition command.h:88
@ CMD_TAG_TRANSFORMS
:tag-transforms
Definition command.h:123
@ CMD_SCORE
:score
Definition command.h:108
@ CMD_MAILTO_ALLOW
:mailto-allow
Definition command.h:95
@ CMD_AUTO_VIEW
:auto-view
Definition command.h:69
@ CMD_UNALTERNATIVE_ORDER
:unalternative-order
Definition command.h:128
@ CMD_UNAUTO_VIEW
:unauto-view
Definition command.h:130
@ CMD_UNHEADER_ORDER
:unheader-order
Definition command.h:134
@ CMD_NOSPAM
:nospam
Definition command.h:102
@ CMD_NONE
No Command.
Definition command.h:62
@ CMD_TAG_FORMATS
:tag-formats
Definition command.h:122
@ CMD_UNIGNORE
:unignore
Definition command.h:136
@ CMD_ALTERNATIVE_ORDER
:alternative-order
Definition command.h:66
@ CMD_UNSCORE
:unscore
Definition command.h:144
@ CMD_HEADER_ORDER
:header-order
Definition command.h:83
@ CMD_UNMAILTO_ALLOW
:unmailto-allow
Definition command.h:140
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:174
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:86
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:123
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:166
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:76
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:50
#define N_(a)
Definition message.h:32