NeoMutt  2023-11-03-85-g512e01
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stddef.h>
31#include <stdbool.h>
32#include "mutt/lib.h"
33#include "config/lib.h"
34
38static const struct Mapping SortAliasMethods[] = {
39 // clang-format off
40 { "address", SORT_ADDRESS },
41 { "alias", SORT_ALIAS },
42 { "unsorted", SORT_ORDER },
43 { NULL, 0 },
44 // clang-format on
45};
46
50static struct ConfigDef AliasVars[] = {
51 // clang-format off
52 { "alias_file", DT_PATH|DT_PATH_FILE, IP "~/.neomuttrc", 0, NULL,
53 "Save new aliases to this file"
54 },
55 { "alias_format", DT_STRING|DT_NOT_EMPTY, IP "%3n %f%t %-15a %-56r | %c", 0, NULL,
56 "printf-like format string for the alias menu"
57 },
59 "Sort method for the alias menu"
60 },
61 { "query_command", DT_STRING|DT_COMMAND, 0, 0, NULL,
62 "External command to query and external address book"
63 },
64 { "query_format", DT_STRING|DT_NOT_EMPTY, IP "%3c %t %-25.25n %-25.25a | %e", 0, NULL,
65 "printf-like format string for the query menu (address book)"
66 },
67 { NULL },
68 // clang-format on
69};
70
75{
77}
static const struct Mapping SortAliasMethods[]
Sort methods for email aliases.
Definition: config.c:38
static struct ConfigDef AliasVars[]
Config definitions for the alias library.
Definition: config.c:50
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:279
#define IP
Definition: set.h:54
bool config_init_alias(struct ConfigSet *cs)
Register alias config variables - Implements module_init_config_t -.
Definition: config.c:74
Convenience wrapper for the library headers.
#define DT_SORT_REVERSE
Sort flag for -reverse prefix.
Definition: sort2.h:32
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:44
@ SORT_ALIAS
Sort by email alias.
Definition: sort2.h:49
@ SORT_ADDRESS
Sort by email address.
Definition: sort2.h:50
Definition: set.h:64
Container for lots of config items.
Definition: set.h:252
Mapping between user-readable string and a constant.
Definition: mapping.h:32
#define DT_SORT
sorting methods
Definition: types.h:40
#define DT_PATH_FILE
Path is a file.
Definition: types.h:58
#define DT_PATH
a path to a file/directory
Definition: types.h:36
#define DT_NOT_EMPTY
Empty strings are not allowed.
Definition: types.h:50
#define DT_STRING
a string
Definition: types.h:41
#define DT_COMMAND
A command.
Definition: types.h:54
#define DT_NO_FLAGS
No flags are set.
Definition: types.h:47