X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=2b1c0fea950d01ae0c37e30accfc1256cd0c5f93;hp=f7f9e70c041d746df56a6bc0386bc06358a67765;hb=fca070f8ce72ac424a6494d9cf2763852f8b219c;hpb=2ce25b93a72b4a8d6daa5321f9ef7df0772a789f diff --git a/notmuch-search.c b/notmuch-search.c index f7f9e70c..2b1c0fea 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -138,6 +138,10 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) fprintf (stderr, "Out of memory.\n"); return 1; } + if (*query_str == '\0') { + fprintf (stderr, "Error: notmuch search requires at least one search term.\n"); + return 1; + } query = notmuch_query_create (notmuch, query_str); if (query == NULL) {