NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include <stddef.h>
32
#include "
config/lib.h
"
33
#include "
lib.h
"
34
#include "
expando/lib.h
"
35
42
static
const
struct
ExpandoDefinition
HistoryFormatDef
[] = {
43
// clang-format off
44
{
"*"
,
"padding-soft"
,
ED_GLOBAL
,
ED_GLO_PADDING_SOFT
,
node_padding_parse
},
45
{
">"
,
"padding-hard"
,
ED_GLOBAL
,
ED_GLO_PADDING_HARD
,
node_padding_parse
},
46
{
"|"
,
"padding-eol"
,
ED_GLOBAL
,
ED_GLO_PADDING_EOL
,
node_padding_parse
},
47
{
"C"
,
"number"
,
ED_HISTORY
,
ED_HIS_NUMBER
, NULL },
48
{
"s"
,
"match"
,
ED_HISTORY
,
ED_HIS_MATCH
, NULL },
49
{ NULL, NULL, 0, -1, NULL }
50
// clang-format on
51
};
52
56
struct
ConfigDef
HistoryVars
[] = {
57
// clang-format off
58
{
"history"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 10, 0, NULL,
59
"Number of history entries to keep in memory per category"
60
},
61
{
"history_file"
,
DT_PATH
|
D_PATH_FILE
,
IP
"~/.mutthistory"
, 0, NULL,
62
"File to save history in"
63
},
64
{
"history_format"
,
DT_EXPANDO
,
IP
"%s"
,
IP
&
HistoryFormatDef
, NULL,
65
"printf-like format string for the history menu"
66
},
67
{
"history_remove_dups"
,
DT_BOOL
,
false
, 0, NULL,
68
"Remove duplicate entries from the history"
69
},
70
{
"save_history"
,
DT_NUMBER
|
D_INTEGER_NOT_NEGATIVE
, 0, 0, NULL,
71
"Number of history entries to save per category"
72
},
73
{ NULL },
74
// clang-format on
75
};
lib.h
Convenience wrapper for the config headers.
IP
#define IP
Definition
set.h:55
ED_GLOBAL
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition
domain.h:44
ED_HISTORY
@ ED_HISTORY
History ED_HIS_ ExpandoDataHistory.
Definition
domain.h:45
lib.h
Parse Expando string.
node_padding_parse
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
HistoryVars
struct ConfigDef HistoryVars[]
Config definitions for the command history.
Definition
config.c:56
HistoryFormatDef
static const struct ExpandoDefinition HistoryFormatDef[]
Expando definitions.
Definition
config.c:42
lib.h
Read/write command history from/to a file.
ED_HIS_MATCH
@ ED_HIS_MATCH
HistoryEntry.history.
Definition
lib.h:83
ED_HIS_NUMBER
@ ED_HIS_NUMBER
HistoryEntry.num.
Definition
lib.h:84
ConfigDef
Definition
set.h:65
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
D_PATH_FILE
#define D_PATH_FILE
Path is a file.
Definition
types.h:104
DT_NUMBER
@ DT_NUMBER
a number
Definition
types.h:38
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
DT_PATH
@ DT_PATH
a path to a file/directory
Definition
types.h:39
D_INTEGER_NOT_NEGATIVE
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition
types.h:101
ED_GLO_PADDING_EOL
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition
uid.h:38
ED_GLO_PADDING_HARD
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition
uid.h:39
ED_GLO_PADDING_SOFT
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition
uid.h:40