97 static const enum CommandId hook_ids[] = {
104 for (
size_t i = 0; i <
countof(hook_ids); i++)
108 bool found_header =
false;
109 struct Hook *hook = NULL;
141 bool found_header =
false;
146 struct HookList *hl = he->
data;
147 struct Hook *hook = NULL;
199 const struct Command *cmd = NULL;
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ CMD_CLOSE_HOOK
:close-hook
@ CMD_SEND_HOOK
:send-hook
@ CMD_INDEX_FORMAT_HOOK
:index-format-hook
@ CMD_SHUTDOWN_HOOK
:shutdown-hook
@ CMD_MESSAGE_HOOK
:message-hook
@ CMD_SEND2_HOOK
:send2-hook
@ CMD_REPLY_HOOK
:reply-hook
@ CMD_STARTUP_HOOK
:startup-hook
@ CMD_SAVE_HOOK
:save-hook
@ CMD_TIMEOUT_HOOK
:timeout-hook
@ CMD_ACCOUNT_HOOK
:account-hook
@ CMD_CRYPT_HOOK
:crypt-hook
@ CMD_MBOX_HOOK
:mbox-hook
@ CMD_FOLDER_HOOK
:folder-hook
@ CMD_OPEN_HOOK
:open-hook
@ CMD_APPEND_HOOK
:append-hook
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
const struct Command * command_find_by_name(const struct CommandArray *ca, const char *name)
Find a NeoMutt Command by its name.
const struct Command * command_find_by_id(const struct CommandArray *ca, enum CommandId id)
Find a NeoMutt Command by its CommandId.
size_t pretty_var(const char *str, struct Buffer *buf)
Escape and stringify a config item value.
Convenience wrapper for the config headers.
bool StartupComplete
When the config has been read.
Convenience wrapper for the core headers.
size_t mutt_file_save_str(FILE *fp, const char *str)
Save a string to a file.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
enum CommandResult parse_hooks(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'hooks' command - Implements Command::parse() -.
struct HashElem * mutt_hash_walk(const struct HashTable *table, struct HashWalkState *state)
Iterate through all the HashElem's in a Hash Table.
static void hooks_dump_charset(struct Buffer *buf)
Dump the Charset Hooks.
static void hooks_dump_index(struct Buffer *buf)
Dump the Index Format Hooks.
static void hooks_dump_one(struct Hook *hook, const struct Command *cmd, struct Buffer *buf)
Dump a single hook to the buffer.
static void hooks_dump_simple(struct Buffer *buf)
Dump the simple Hooks.
struct HashTable * IdxFmtHooks
All Index Format hooks.
struct HookList Hooks
All simple hooks, e.g. CMD_FOLDER_HOOK.
Parse user-defined Hooks.
struct LookupList Lookups
Lookup table of preferred character set names.
@ MUTT_LOOKUP_ICONV
Character set conversion.
@ MUTT_LOOKUP_CHARSET
Alias for another character set.
Convenience wrapper for the library headers.
Many unsorted constants and some structs.
void pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Some miscellaneous functions.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_EMPTY(head)
String manipulation buffer.
const char * help
One-line description of the Command.
const char * name
Name of the Command.
const char * string
Pointer to the parsed string.
The item stored in a Hash Table.
union HashKey key
Key representing the data.
void * data
User-supplied data.
Cursor to iterate through a Hash Table.
struct Regex regex
Regular expression.
char * command
Filename, command or pattern to execute.
struct Expando * expando
Used for format hooks.
enum CommandId id
Hook CommandId, e.g. CMD_FOLDER_HOOK.
Regex to String lookup table.
char * replacement
Alternative charset to use.
enum LookupType type
Lookup type.
struct Regex regex
Regular expression.
Container for Accounts, Notifications.
struct CommandArray commands
NeoMutt commands.
Context for config parsing (history/backtrace)
Detailed error information from config parsing.
struct Buffer * message
Error message.
char * pattern
printable version
const char * strkey
String key.