"\t\t\tto:<name-or-address>\n"
"\t\t\tsubject:<word-or-quoted-phrase>\n"
"\t\t\tattachment:<word>\n"
- "\t\t\ttag:<tag>\n"
+ "\t\t\ttag:<tag> (or is:<tag>)\n"
"\t\t\tid:<message-id>\n"
"\t\t\tthread:<thread-id>\n"
"\n"
"\t\tthe subject of an email. Quoted phrases are supported when\n"
"\t\tsearching with: subject:\"this is a phrase\".\n"
"\n"
- "\t\tFor tag:, valid tag values include \"inbox\" and \"unread\"\n"
+ "\t\tFor tag: and is:, valid tag values include \"inbox\" and \"unread\"\n"
"\t\tby default for new messages added by \"notmuch new\" as well\n"
"\t\tas any other tag values added manually with \"notmuch tag\".\n"
"\n"
command_t *command;
unsigned int i;
- fprintf (out, "Usage: notmuch <command> [args...]\n");
+ fprintf (out,
+ "Usage: notmuch --help\n"
+ " notmuch --version\n"
+ " notmuch <command> [args...]\n");
fprintf (out, "\n");
fprintf (out, "Where <command> and [args...] are as follows:\n");
fprintf (out, "\n");
if (argc == 1)
return notmuch (local);
+ if (STRNCMP_LITERAL (argv[1], "--help") == 0)
+ return notmuch_help_command (NULL, 0, NULL);
+
+ if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
+ printf ("notmuch version " STRINGIFY(NOTMUCH_VERSION) "\n");
+ return 0;
+ }
+
for (i = 0; i < ARRAY_SIZE (commands); i++) {
command = &commands[i];