aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-tag.c
diff options
context:
space:
mode:
authorGravatar Peter Wang <novalazy@gmail.com>2013-06-23 14:23:54 +1000
committerGravatar David Bremner <bremner@debian.org>2013-06-29 14:36:07 -0300
commite8efa11da90fa47adcbc489638320d61ac98391a (patch)
tree4e8739a1084d3260521fc5b74e6cdd456da3615f /notmuch-tag.c
parentb7df509fb525922aad6700e509ffce7bdf39d05e (diff)
tag-util: move out 'tag' command-line check
Move an error condition specific to the 'tag' command out of parse_tag_command_line so that parse_tag_command_line can be used for the forthcoming 'insert' command.
Diffstat (limited to 'notmuch-tag.c')
-rw-r--r--notmuch-tag.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/notmuch-tag.c b/notmuch-tag.c
index 9a5d3e71..3b09df99 100644
--- a/notmuch-tag.c
+++ b/notmuch-tag.c
@@ -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),