X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-config.c;h=934827874b1eb3548fa6b9fa1fdf4d9955174ee6;hp=2d5c297b7f5f2996b89c6e7c9502df90a06c93d6;hb=447ad6b4984c71881b7f97641c77f0a39b71a991;hpb=0018a8d787a98f80c665061daa9b0c73839d3666 diff --git a/notmuch-config.c b/notmuch-config.c index 2d5c297b..93482787 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -872,8 +872,15 @@ int notmuch_config_command (notmuch_config_t *config, int argc, char *argv[]) { int ret; + int opt_index; - argc--; argv++; /* skip subcommand argument */ + opt_index = notmuch_minimal_options ("config", argc, argv); + if (opt_index < 0) + return EXIT_FAILURE; + + /* skip at least subcommand argument */ + argc-= opt_index; + argv+= opt_index; if (argc < 1) { fprintf (stderr, "Error: notmuch config requires at least one argument.\n");