X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-tag.c;h=bc61aab8673a532bd3f80526b77db5aedb4284e2;hb=a6822eccaca773aa03473bca490618e30dac24ca;hp=0e73197cfb59595f5e7782d3e3d1c79aec2066f9;hpb=703136c57bc7a22edcc9b28ad3e9ff2a8dbdc3b3;p=notmuch diff --git a/notmuch-tag.c b/notmuch-tag.c index 0e73197c..bc61aab8 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -233,6 +233,11 @@ notmuch_tag_command (notmuch_config_t *config, int argc, char *argv[]) if (parse_tag_command_line (config, argc - opt_index, argv + opt_index, &query_string, tag_ops)) return 1; + + if (tag_op_list_size (tag_ops) == 0) { + fprintf (stderr, "Error: 'notmuch tag' requires at least one tag to add or remove.\n"); + return 1; + } } if (notmuch_database_open (notmuch_config_get_database_path (config),