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