int
notmuch_config_command (void *ctx, int argc, char *argv[])
{
+ argc--; argv++; /* skip subcommand argument */
+
if (argc < 2) {
fprintf (stderr, "Error: notmuch config requires at least two arguments.\n");
return 1;
notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST;
#endif
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;
if (notmuch == NULL)
return 1;
+ argc--; argv++; /* skip subcommand argument */
+
if (argc && strcmp (argv[0], "--") != 0) {
fprintf (stderr, "Warning: the output file argument of dump is deprecated.\n");
output = fopen (argv[0], "w");
add_files_state.verbose = 0;
add_files_state.output_is_a_tty = isatty (fileno (stdout));
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (STRNCMP_LITERAL (argv[i], "--verbose") == 0) {
add_files_state.verbose = 1;
params.part = -1;
params.cryptoctx = NULL;
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;
synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
+ argc--; argv++; /* skip subcommand argument */
+
if (argc) {
input = fopen (argv[0], "r");
if (input == NULL) {
int i, ret;
output_t output = OUTPUT_SUMMARY;
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;
params.cryptoctx = NULL;
params.decrypt = 0;
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc && argv[i][0] == '-'; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;
return 1;
}
+ argc--; argv++; /* skip subcommand argument */
+
for (i = 0; i < argc; i++) {
if (strcmp (argv[i], "--") == 0) {
i++;
command_t *command;
unsigned int i;
+ argc--; argv++; /* Ignore "help" */
+
if (argc == 0) {
printf ("The notmuch mail system.\n\n");
usage (stdout);
command = &commands[i];
if (strcmp (argv[1], command->name) == 0)
- return (command->function) (local, argc - 2, &argv[2]);
+ return (command->function) (local, argc - 1, &argv[1]);
}
fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n",