]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-count.c
emacs: add invisible space after the search widget field in notmuch-hello
[notmuch] / notmuch-count.c
index 97242abaa778b00764264a0c396e65f6be75e188..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++;
@@ -90,7 +92,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
        fprintf (stderr, "Out of memory.\n");
        return 1;
     }
-    if (*query_str == '\0' || (*query_str == '*' && *(query_str+1) == '\0')) {
+
+    if (*query_str == '\0') {
        query_str = talloc_strdup (ctx, "");
     }