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++;
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;
+ query_str = talloc_strdup (ctx, "");
}
query = notmuch_query_create (notmuch, query_str);