NeoMutt  2024-04-25-89-g194907
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libhistory. More...

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

Go to the source code of this file.

Functions

bool config_init_history (struct ConfigSet *cs)
 Register history config variables - Implements module_init_config_t -.
 

Variables

static const struct ExpandoDefinition HistoryFormatDef []
 Expando definitions.
 
static struct ConfigDef HistoryVars []
 Config definitions for the command history.
 

Detailed Description

Config used by libhistory.

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 config.c.

Variable Documentation

◆ HistoryFormatDef

const struct ExpandoDefinition HistoryFormatDef[]
static
Initial value:
= {
{ "C", "number", ED_HISTORY, ED_HIS_NUMBER, E_TYPE_NUMBER, NULL },
{ "s", "match", ED_HISTORY, ED_HIS_MATCH, E_TYPE_STRING, NULL },
{ NULL, NULL, 0, -1, -1, NULL }
}
@ E_TYPE_STRING
Data is a string.
Definition: definition.h:37
@ E_TYPE_NUMBER
Data is numeric.
Definition: definition.h:38
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
@ ED_HISTORY
History ED_HIS_ ExpandoDataHistory.
Definition: domain.h:45
struct ExpandoNode * node_padding_parse(const char *str, const char **parsed_until, int did, int uid, ExpandoParserFlags flags, struct ExpandoParseError *error)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:232
@ ED_HIS_MATCH
HistoryEntry.history.
Definition: lib.h:77
@ ED_HIS_NUMBER
HistoryEntry.num.
Definition: lib.h:78
@ 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:

  • $history_format

Definition at line 42 of file config.c.

◆ HistoryVars

struct ConfigDef HistoryVars[]
static
Initial value:
= {
{ "history", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 10, 0, NULL,
"Number of history entries to keep in memory per category"
},
{ "history_file", DT_PATH|D_PATH_FILE, IP "~/.mutthistory", 0, NULL,
"File to save history in"
},
{ "history_format", DT_EXPANDO, IP "%s", IP &HistoryFormatDef, NULL,
"printf-like format string for the history menu"
},
{ "history_remove_dups", DT_BOOL, false, 0, NULL,
"Remove duplicate entries from the history"
},
{ "save_history", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
"Number of history entries to save per category"
},
{ NULL },
}
#define IP
Definition: set.h:54
static const struct ExpandoDefinition HistoryFormatDef[]
Expando definitions.
Definition: config.c:42
#define D_PATH_FILE
Path is a file.
Definition: types.h:104
@ DT_NUMBER
a number
Definition: types.h:39
@ DT_BOOL
boolean option
Definition: types.h:32
@ DT_EXPANDO
an expando
Definition: types.h:34
@ DT_PATH
a path to a file/directory
Definition: types.h:40
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:101

Config definitions for the command history.

Definition at line 56 of file config.c.