]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-count.c
Have notmuch count default to showing the total.
[notmuch] / notmuch-count.c
index 77aa4338db27e2b3cdfceaff43e2233d3788bdd7..97242abaa778b00764264a0c396e65f6be75e188 100644 (file)
@@ -90,9 +90,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
        fprintf (stderr, "Out of memory.\n");
        return 1;
     }
-    if (*query_str == '\0') {
-       fprintf (stderr, "Error: notmuch count requires at least one count term.\n");
-       return 1;
+    if (*query_str == '\0' || (*query_str == '*' && *(query_str+1) == '\0')) {
+       query_str = talloc_strdup (ctx, "");
     }
 
     query = notmuch_query_create (notmuch, query_str);