X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=97242abaa778b00764264a0c396e65f6be75e188;hp=77aa4338db27e2b3cdfceaff43e2233d3788bdd7;hb=b15a03fafc2e313264519f030e45ea203af508e2;hpb=37b8f5a8f2af32eabbb5ff1ba751bdfa2ee08082 diff --git a/notmuch-count.c b/notmuch-count.c index 77aa4338..97242aba 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -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);