-static const char search_terms_help[] =
- "\t\tSeveral notmuch commands accept a comman syntax for search\n"
- "\t\tterms.\n"
- "\n"
- "\t\tThe search terms can consist of free-form text (and quoted\n"
- "\t\tphrases) which will match all messages that contain all of\n"
- "\t\tthe given terms/phrases in the body, the subject, or any of\n"
- "\t\tthe sender or recipient headers.\n"
- "\n"
- "\t\tIn addition to free text, the following prefixes can be used\n"
- "\t\tto force terms to match against specific portions of an email,\n"
- "\t\t(where <brackets> indicate user-supplied values):\n"
- "\n"
- "\t\t\tfrom:<name-or-address>\n"
- "\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\tid:<message-id>\n"
- "\t\t\tthread:<thread-id>\n"
- "\n"
- "\t\tThe from: prefix is used to match the name or address of\n"
- "\t\tthe sender of an email message.\n"
- "\n"
- "\t\tThe to: prefix is used to match the names or addresses of\n"
- "\t\tany recipient of an email message, (whether To, Cc, or Bcc).\n"
- "\n"
- "\t\tAny term prefixed with subject: will match only text from\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\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"
- "\t\tFor id:, message ID values are the literal contents of the\n"
- "\t\tMessage-ID: header of email messages, but without the '<','>'\n"
- "\t\tdelimiters.\n"
- "\n"
- "\t\tThe thread: prefix can be used with the thread ID values that\n"
- "\t\tare generated internally by notmuch (and do not appear in email\n"
- "\t\tmessages). These thread ID values can be seen in the first\n"
- "\t\tcolumn of output from \"notmuch search\".\n"
- "\n"
- "\t\tIn addition to individual terms, multiple terms can be\n"
- "\t\tcombined with Boolean operators (\"and\", \"or\", \"not\", etc.).\n"
- "\t\tEach term in the query will be implicitly connected by a\n"
- "\t\tlogical AND if no explicit operator is provided, (except\n"
- "\t\tthat terms with a common prefix will be implicitly combined\n"
- "\t\twith OR until we get Xapian defect #402 fixed).\n"
- "\n"
- "\t\tParentheses can also be used to control the combination of\n"
- "\t\tthe Boolean operators, but will have to be protected from\n"
- "\t\tinterpretation by the shell, (such as by putting quotation\n"
- "\t\tmarks around any parenthesized expression).\n"
- "\n"
- "\t\tFinally, results can be restricted to only messages within a\n"
- "\t\tparticular time range, (based on the Date: header) with:\n"
- "\n"
- "\t\t\t<intial-timestamp>..<final-timestamp>\n"
- "\n"
- "\t\tEach timestamp is a number representing the number of seconds\n"
- "\t\tsince 1970-01-01 00:00:00 UTC. This is not the most convenient\n"
- "\t\tmeans of expressing date ranges, but until notmuch is fixed to\n"
- "\t\taccept a more convenient form, one can use the date program to\n"
- "\t\tconstruct timestamps. For example, with the bash shell the\n"
- "\t\tfollowing syntax would specify a date range to return messages\n"
- "\t\tfrom 2009-10-01 until the current time:\n"
- "\n"
- "\t\t\t$(date +%%s -d 2009-10-01)..$(date +%%s)\n\n";
-
-command_t commands[] = {