notmuch show: Add documentation of --format=mbox

Shame on me for adding a feature without documenting it at the same
time.
This commit is contained in:
Carl Worth 2010-08-19 17:12:52 -07:00
parent c8da979352
commit 9f0accb6aa
2 changed files with 40 additions and 11 deletions

View file

@ -201,13 +201,13 @@ matched message will be displayed.
.RS 4 .RS 4
.TP 4 .TP 4
.B \-\-format=(json|text) .B \-\-format=(text|json|mbox)
.RS 4 .RS 4
.TP 4 .TP 4
.B text .B text
The default plain-text format has text-content MIME parts The default plain-text format has all text-content MIME parts
decoded. Various components in the output, decoded. Various components in the output,
.RB ( message ", " header ", " body ", " attachment ", and MIME " part ), .RB ( message ", " header ", " body ", " attachment ", and MIME " part ),
will be delimited by easily-parsed markers. Each marker consists of a will be delimited by easily-parsed markers. Each marker consists of a
@ -220,12 +220,27 @@ or close the component.
.TP 4 .TP 4
.B json .B json
Format output as Javascript Object Notation (JSON). JSON output always The output is formatted with Javascript Object Notation (JSON). This
includes all messages in a matching thread; in effect format is more robust than the text format for automated
processing. JSON output always includes all messages in a matching
thread; in effect
.B \-\-format=json .B \-\-format=json
implies implies
.B \-\-entire\-thread .B \-\-entire\-thread
.RE
.RS 4
.TP 4
.B mbox
All matching messages are output in the traditional, Unix mbox format
with each message being prefixed by a line beginning with "From " and
a blank line separating each message. Lines in the message content
beginning with "From " (preceded by zero or more '>' characters) have
an additional '>' character added. This reversible escaping
is termed "mboxrd" format and described in detail here:
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
.RE .RE
A common use of A common use of
.B notmuch show .B notmuch show

View file

@ -189,12 +189,12 @@ command_t commands[] = {
"\t\tall messages in the same thread as any matched\n" "\t\tall messages in the same thread as any matched\n"
"\t\tmessage will be displayed.\n" "\t\tmessage will be displayed.\n"
"\n" "\n"
"\t--format=(json|text)\n" "\t--format=(text|json|mbox)\n"
"\n" "\n"
"\t\ttext\t(default)\n" "\t\ttext (default)\n"
"\n" "\n"
"\t\tThe plain-text has all text-content MIME parts decoded.\n" "\t\tThe default plain-text format has all text-content MIME parts\n"
"\t\tVarious components in the output, ('message', 'header',\n" "\t\tdecoded. Various components in the output, ('message', 'header',\n"
"\t\t'body', 'attachment', and MIME 'part') are delimited by\n" "\t\t'body', 'attachment', and MIME 'part') are delimited by\n"
"\t\teasily-parsed markers. Each marker consists of a Control-L\n" "\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\tcharacter (ASCII decimal 12), the name of the marker, and\n"
@ -203,9 +203,23 @@ command_t commands[] = {
"\n" "\n"
"\t\tjson\n" "\t\tjson\n"
"\n" "\n"
"\t\tFormat output as Javascript Object Notation (JSON).\n" "\t\tThe output is formatted with Javascript Object Notation\n"
"\t\tJSON output always includes all messages in a matching,\n" "\t\t(JSON). This format is more robust than the text format\n"
"\t\tthread i.e. '--format=json' implies '--entire-thread'\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"
"\n"
"\t\tmbox\n"
"\n"
"\t\tAll matching messages are output in the traditional, Unix\n"
"\t\tmbox format with each message being prefixed by a line\n"
"\t\tbeginning with 'From ' and a blank line separating each\n"
"\t\tmessage. Lines in the message content beginning with 'From '\n"
"\t\t(preceded by zero or more '>' characters) have an additional\n"
"\t\t'>' character added. This reversible escaping is termed\n"
"\t\t\"mboxrd\" format and described in detail here:\n"
"\n"
"\t\thttp://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html\n"
"\n" "\n"
"\tA common use of \"notmuch show\" is to display a single\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" "\tthread of email messages. For this, use a search term of\n"