+static const command_t commands[] = {
+ { NULL, notmuch_command, NOTMUCH_COMMAND_CONFIG_CREATE | NOTMUCH_COMMAND_CONFIG_LOAD,
+ "Notmuch main command." },
+ { "setup", notmuch_setup_command, NOTMUCH_COMMAND_CONFIG_CREATE | NOTMUCH_COMMAND_CONFIG_LOAD,
+ "Interactively set up notmuch for first use." },
+ { "new", notmuch_new_command,
+ NOTMUCH_COMMAND_DATABASE_EARLY | NOTMUCH_COMMAND_DATABASE_WRITE |
+ NOTMUCH_COMMAND_DATABASE_CREATE,
+ "Find and import new messages to the notmuch database." },
+ { "insert", notmuch_insert_command, NOTMUCH_COMMAND_DATABASE_EARLY |
+ NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Add a new message into the maildir and notmuch database." },
+ { "search", notmuch_search_command, NOTMUCH_COMMAND_DATABASE_EARLY,
+ "Search for messages matching the given search terms." },
+ { "address", notmuch_address_command, NOTMUCH_COMMAND_DATABASE_EARLY,
+ "Get addresses from messages matching the given search terms." },
+ { "show", notmuch_show_command, NOTMUCH_COMMAND_DATABASE_EARLY,
+ "Show all messages matching the search terms." },
+ { "count", notmuch_count_command, NOTMUCH_COMMAND_DATABASE_EARLY,
+ "Count messages matching the search terms." },
+ { "reply", notmuch_reply_command, NOTMUCH_COMMAND_DATABASE_EARLY,
+ "Construct a reply template for a set of messages." },
+ { "tag", notmuch_tag_command, NOTMUCH_COMMAND_DATABASE_EARLY | NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Add/remove tags for all messages matching the search terms." },
+ { "dump", notmuch_dump_command, NOTMUCH_COMMAND_DATABASE_EARLY | NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Create a plain-text dump of the tags for each message." },
+ { "restore", notmuch_restore_command, NOTMUCH_COMMAND_DATABASE_EARLY |
+ NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Restore the tags from the given dump file (see 'dump')." },
+ { "compact", notmuch_compact_command, NOTMUCH_COMMAND_DATABASE_EARLY |
+ NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Compact the notmuch database." },
+ { "reindex", notmuch_reindex_command, NOTMUCH_COMMAND_DATABASE_EARLY |
+ NOTMUCH_COMMAND_DATABASE_WRITE,
+ "Re-index all messages matching the search terms." },
+ { "config", notmuch_config_command, NOTMUCH_COMMAND_CONFIG_LOAD,
+ "Get or set settings in the notmuch configuration file." },
+#if WITH_EMACS
+ { "emacs-mua", NULL, 0,
+ "send mail with notmuch and emacs." },
+#endif
+ { "help", notmuch_help_command, NOTMUCH_COMMAND_CONFIG_CREATE, /* create but don't save config */
+ "This message, or more detailed help for the named command." }
+};