Functions to parse commands in a config file. More...
#include "config.h"
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "mutt/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "command_parse.h"
#include "imap/lib.h"
#include "menu/lib.h"
#include "init.h"
#include "keymap.h"
#include "mutt_commands.h"
#include "mutt_globals.h"
#include "muttlib.h"
#include "mx.h"
#include "myvar.h"
#include "options.h"
#include "version.h"
#include "monitor.h"
#include <libintl.h>
Go to the source code of this file.
Macros | |
#define | MAX_ERRS 128 |
Enumerations | |
enum | GroupState { GS_NONE , GS_RX , GS_ADDR } |
Type of email address group. More... | |
Functions | |
static bool | is_function (const char *name) |
Is the argument a neomutt function? More... | |
int | parse_grouplist (struct GroupList *gl, struct Buffer *buf, struct Buffer *s, struct Buffer *err) |
Parse a group context. More... | |
int | source_rc (const char *rcfile_path, struct Buffer *err) |
Read an initialization file. More... | |
enum CommandResult | parse_cd (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'cd' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_echo (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'echo' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_finish (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'finish' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_group (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'group' and 'ungroup' commands - Implements Command::parse() -. More... | |
enum CommandResult | parse_ifdef (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'ifdef' and 'ifndef' commands - Implements Command::parse() -. More... | |
enum CommandResult | parse_ignore (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'ignore' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_lists (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'lists' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_mailboxes (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'mailboxes' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_my_hdr (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'my_hdr' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_set (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'set' family of commands - Implements Command::parse() -. More... | |
enum CommandResult | parse_setenv (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'setenv' and 'unsetenv' commands - Implements Command::parse() -. More... | |
enum CommandResult | parse_source (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'source' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_spam_list (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'spam' and 'nospam' commands - Implements Command::parse() -. More... | |
enum CommandResult | parse_stailq (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse a list command - Implements Command::parse() -. More... | |
enum CommandResult | parse_subscribe (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'subscribe' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_subscribe_to (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'subscribe-to' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_tag_formats (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'tag-formats' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_tag_transforms (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'tag-transforms' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unignore (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unignore' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unlists (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unlists' command - Implements Command::parse() -. More... | |
static void | do_unmailboxes (struct Mailbox *m) |
Remove a Mailbox from the Sidebar/notifications. More... | |
static void | do_unmailboxes_star (void) |
Remove all Mailboxes from the Sidebar/notifications. More... | |
enum CommandResult | parse_unmailboxes (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unmailboxes' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unmy_hdr (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unmy_hdr' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unstailq (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse an unlist command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unsubscribe (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unsubscribe' command - Implements Command::parse() -. More... | |
enum CommandResult | parse_unsubscribe_from (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err) |
Parse the 'unsubscribe-from' command - Implements Command::parse() -. More... | |
void | clear_source_stack (void) |
Free memory from the stack used for the source command. More... | |
Variables | |
static struct ListHead | MuttrcStack = STAILQ_HEAD_INITIALIZER(MuttrcStack) |
Functions to parse commands in a config file.
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 command_parse.c.
#define MAX_ERRS 128 |
Definition at line 69 of file command_parse.c.
enum GroupState |
Type of email address group.
Enumerator | |
---|---|
GS_NONE | Group is missing an argument. |
GS_RX | Entry is a regular expression. |
GS_ADDR | Entry is an address. |
Definition at line 74 of file command_parse.c.
|
static |
Is the argument a neomutt function?
name | Command name to be searched for |
true | Function found |
false | Function not found |
Definition at line 87 of file command_parse.c.
int parse_grouplist | ( | struct GroupList * | gl, |
struct Buffer * | buf, | ||
struct Buffer * | s, | ||
struct Buffer * | err | ||
) |
Parse a group context.
gl | GroupList to add to |
buf | Temporary Buffer space |
s | Buffer containing string to be parsed |
err | Buffer for error messages |
0 | Success |
-1 | Error |
Definition at line 111 of file command_parse.c.
int source_rc | ( | const char * | rcfile_path, |
struct Buffer * | err | ||
) |
Read an initialization file.
rcfile_path | Path to initialization file |
err | Buffer for error messages |
<0 | NeoMutt should pause to let the user know |
Definition at line 144 of file command_parse.c.
|
static |
Remove a Mailbox from the Sidebar/notifications.
m | Mailbox to unmailboxes |
Definition at line 1490 of file command_parse.c.
|
static |
Remove all Mailboxes from the Sidebar/notifications.
Definition at line 1513 of file command_parse.c.
void clear_source_stack | ( | void | ) |
Free memory from the stack used for the source command.
Definition at line 1698 of file command_parse.c.
|
static |
Definition at line 1 of file command_parse.c.