]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-count.c
cli: change argument parsing convention for subcommands
[notmuch] / notmuch-count.c
index 39f08c6ca94476757c5591c7a171c74c16875018..0d700a9e12f8205fbe92f3309cb162dd7cc15d95 100644 (file)
@@ -35,6 +35,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
     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++;