X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;h=098f73357e4ec43ae922fed50d0663deb1e65c1b;hp=e92f14c546daaeb88a933432bd193fec17138bd8;hb=362ab047c264ae67ec3de041aec637979077db21;hpb=6dcb7592e32ed5140ea0c0357ce78d6a37af6066 diff --git a/notmuch.c b/notmuch.c index e92f14c5..098f7335 100644 --- a/notmuch.c +++ b/notmuch.c @@ -58,6 +58,7 @@ static const char search_terms_help[] = "\t\ttag: (or is:)\n" "\t\tid:\n" "\t\tthread:\n" + "\t\tfolder:\n" "\n" "\tThe from: prefix is used to match the name or address of\n" "\tthe sender of an email message.\n" @@ -82,6 +83,11 @@ static const char search_terms_help[] = "\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" @@ -165,7 +171,7 @@ command_t commands[] = { "\t\tPresents the results in either JSON or\n" "\t\tplain-text (default)\n" "\n" - "\t--output=(summary|threads|messages|tags)\n" + "\t--output=(summary|threads|messages|files|tags)\n" "\n" "\t\tsummary (default)\n" "\n" @@ -186,6 +192,12 @@ command_t commands[] = { "\t\tterms, either one per line (--format=text) or as a JSON array\n" "\t\t(--format=json).\n" "\n" + "\t\tfiles\n" + "\n" + "\t\tOutput the filenames of all messages matching the search\n" + "\t\tterms, either one per line (--format=text) or as a JSON array\n" + "\t\t(--format=json).\n" + "\n" "\t\ttags\n" "\n" "\t\tOutput all tags that appear on any message matching the search\n" @@ -216,7 +228,7 @@ command_t commands[] = { "\t\tall messages in the same thread as any matched\n" "\t\tmessage will be displayed.\n" "\n" - "\t--format=(text|json|mbox)\n" + "\t--format=(text|json|mbox|raw)\n" "\n" "\t\ttext (default)\n" "\n" @@ -226,15 +238,17 @@ command_t commands[] = { "\t\teasily-parsed markers. Each marker consists of a Control-L\n" "\t\tcharacter (ASCII decimal 12), the name of the marker, and\n" "\t\tthen either an opening or closing brace, '{' or '}' to\n" - "\t\teither open or close the component.\n" + "\t\teither open or close the component. For a multipart MIME\n" + "\t\tmessage, these parts will be nested.\n" "\n" "\t\tjson\n" "\n" "\t\tThe output is formatted with Javascript Object Notation\n" "\t\t(JSON). This format is more robust than the text format\n" - "\t\tfor automated processing. JSON output always includes all\n" - "\t\tmessages in a matching thread; in effect '--format=json'\n" - "\t\timplies '--entire-thread'\n" + "\t\tfor automated processing. The nested structure of multipart\n" + "\t\tMIME messages is reflected in nested JSON output. JSON\n" + "\t\toutput always includes all messages in a matching thread;\n" + "\t\tin effect '--format=json' implies '--entire-thread'\n" "\n" "\t\tmbox\n" "\n" @@ -248,6 +262,13 @@ command_t commands[] = { "\n" "\t\thttp://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html\n" "\n" + "\t\traw\n" + "\n" + "\t\tThe original, raw content of the email message is displayed.\n" + "\t\tConsumers of this format should expect to implement MIME\n" + "\t\tdecoding and similar functions. This format must only\n" + "\t\tbe used with search terms matching a single message.\n" + "\n" "\tA common use of \"notmuch show\" is to display a single\n" "\tthread of email messages. For this, use a search term of\n" "\t\"thread:\" as can be seen in the first column\n" @@ -529,6 +550,8 @@ main (int argc, char *argv[]) command_t *command; unsigned int i; + talloc_enable_null_tracking (); + local = talloc_new (NULL); g_mime_init (0);