NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libaddress. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "expando/lib.h"
#include "gui.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

bool config_init_alias (struct ConfigSet *cs)
 Register alias config variables - Implements module_init_config_t -.
 

Variables

static const struct Mapping SortAliasMethods []
 Sort methods for email aliases.
 
static const struct ExpandoDefinition AliasFormatDef []
 Expando definitions.
 
static const struct ExpandoDefinition QueryFormatDef []
 Expando definitions.
 
static struct ConfigDef AliasVars []
 Config definitions for the alias library.
 

Detailed Description

Config used by libaddress.

Authors
  • Romeu Vieira
  • 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 config.c.

Variable Documentation

◆ SortAliasMethods

const struct Mapping SortAliasMethods[]
static
Initial value:
= {
{ "address", SORT_ADDRESS },
{ "alias", SORT_ALIAS },
{ "unsorted", SORT_ORDER },
{ NULL, 0 },
}
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:40
@ SORT_ALIAS
Sort by email alias.
Definition: sort2.h:45
@ SORT_ADDRESS
Sort by email address.
Definition: sort2.h:46

Sort methods for email aliases.

Definition at line 42 of file config.c.

◆ AliasFormatDef

const struct ExpandoDefinition AliasFormatDef[]
static
Initial value:
= {
{ "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
{ ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
{ "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
{ "a", "name", ED_ALIAS, ED_ALI_NAME, NULL },
{ "c", "comment", ED_ALIAS, ED_ALI_COMMENT, NULL },
{ "f", "flags", ED_ALIAS, ED_ALI_FLAGS, NULL },
{ "n", "number", ED_ALIAS, ED_ALI_NUMBER, NULL },
{ "r", "address", ED_ALIAS, ED_ALI_ADDRESS, NULL },
{ "t", "tagged", ED_ALIAS, ED_ALI_TAGGED, NULL },
{ "Y", "tags", ED_ALIAS, ED_ALI_TAGS, NULL },
{ NULL, NULL, 0, -1, NULL }
}
@ ED_ALIAS
Alias ED_ALI_ ExpandoDataAlias.
Definition: domain.h:35
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:234
@ ED_ALI_FLAGS
Alias.flags.
Definition: gui.h:75
@ ED_ALI_NUMBER
AliasView.num.
Definition: gui.h:77
@ ED_ALI_NAME
Alias.name.
Definition: gui.h:76
@ ED_ALI_ADDRESS
Alias.addr.
Definition: gui.h:73
@ ED_ALI_COMMENT
Alias.comment.
Definition: gui.h:74
@ ED_ALI_TAGGED
AliasView.tagged.
Definition: gui.h:78
@ ED_ALI_TAGS
Alias.tags.
Definition: gui.h:79
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition: uid.h:36
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition: uid.h:37
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition: uid.h:38

Expando definitions.

Config:

  • $alias_format

Definition at line 57 of file config.c.

◆ QueryFormatDef

const struct ExpandoDefinition QueryFormatDef[]
static
Initial value:
= {
{ "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
{ ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
{ "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
{ "a", "address", ED_ALIAS, ED_ALI_ADDRESS, NULL },
{ "c", "number", ED_ALIAS, ED_ALI_NUMBER, NULL },
{ "e", "comment", ED_ALIAS, ED_ALI_COMMENT, NULL },
{ "n", "name", ED_ALIAS, ED_ALI_NAME, NULL },
{ "t", "tagged", ED_ALIAS, ED_ALI_TAGGED, NULL },
{ "Y", "tags", ED_ALIAS, ED_ALI_TAGS, NULL },
{ NULL, NULL, 0, -1, NULL }
}

Expando definitions.

Config:

  • $query_format

Definition at line 79 of file config.c.

◆ AliasVars

struct ConfigDef AliasVars[]
static
Initial value:
= {
{ "alias_file", DT_PATH|D_PATH_FILE, IP "~/.neomuttrc", 0, NULL,
"Save new aliases to this file"
},
{ "alias_format", DT_EXPANDO|D_NOT_EMPTY, IP "%3n %f%t %-15a %-56r | %c", IP &AliasFormatDef, NULL,
"printf-like format string for the alias menu"
},
"Sort method for the alias menu"
},
{ "query_command", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
"External command to query and external address book"
},
{ "query_format", DT_EXPANDO|D_NOT_EMPTY, IP "%3c %t %-25.25n %-25.25a | %e", IP &QueryFormatDef, NULL,
"printf-like format string for the query menu (address book)"
},
{ NULL },
}
static const struct ExpandoDefinition QueryFormatDef[]
Expando definitions.
Definition: config.c:79
static const struct Mapping SortAliasMethods[]
Sort methods for email aliases.
Definition: config.c:42
static const struct ExpandoDefinition AliasFormatDef[]
Expando definitions.
Definition: config.c:57
#define IP
Definition: set.h:54
#define D_STRING_COMMAND
A command.
Definition: types.h:99
#define D_PATH_FILE
Path is a file.
Definition: types.h:104
@ DT_STRING
a string
Definition: types.h:45
@ DT_SORT
sorting methods
Definition: types.h:44
@ DT_EXPANDO
an expando
Definition: types.h:34
@ DT_PATH
a path to a file/directory
Definition: types.h:40
#define D_SORT_REVERSE
Sort flag for -reverse prefix.
Definition: types.h:120
#define D_NOT_EMPTY
Empty strings are not allowed.
Definition: types.h:80

Config definitions for the alias library.

Definition at line 97 of file config.c.