]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-tag.c
tag-util: move out 'tag' command-line check
[notmuch] / notmuch-tag.c
index 9a5d3e718422068411592c8ebbb1271db9ef0eaf..3b09df995ec58005b37db4269b428e9c996e03d1 100644 (file)
@@ -247,6 +247,11 @@ notmuch_tag_command (notmuch_config_t *config, int argc, char *argv[])
            fprintf (stderr, "Error: 'notmuch tag' requires at least one tag to add or remove.\n");
            return 1;
        }
+
+       if (*query_string == '\0') {
+           fprintf (stderr, "Error: notmuch tag requires at least one search term.\n");
+           return 1;
+       }
     }
 
     if (notmuch_database_open (notmuch_config_get_database_path (config),