doc: use program and option directives to document options

Use the program and option directives to document the subcommand
options. This unifies a lot of option documentation throughout.

This also makes it possible to reference options with :option:`--foo`
(within .. program::) or :option:`subcommand --foo` (globally). This
is left for later work.

See https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#directive-program

Note: There is a lot of indentation change, but intentionally there is
no reflow. Using 'git diff -w' or 'git show -w' to ignore white space
changes makes this a very easy change to review.
This commit is contained in:
Jani Nikula 2021-05-21 23:44:12 +03:00 committed by David Bremner
parent 574b2436ee
commit f2e2f2aa96
15 changed files with 740 additions and 635 deletions

View file

@ -20,18 +20,23 @@ See :any:`notmuch-search-terms(7)` for details of the supported syntax for
Supported options for **address** include Supported options for **address** include
``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**) .. program:: address
.. option:: --format=(json|sexp|text|text0)
Presents the results in either JSON, S-Expressions, newline Presents the results in either JSON, S-Expressions, newline
character separated plain-text (default), or null character character separated plain-text (default), or null character
separated plain-text (compatible with :manpage:`xargs(1)` -0 separated plain-text (compatible with :manpage:`xargs(1)` -0
option where available). option where available).
``--format-version=N`` .. option:: --format-version=N
Use the specified structured output format version. This is Use the specified structured output format version. This is
intended for programs that invoke :any:`notmuch(1)` internally. If intended for programs that invoke :any:`notmuch(1)` internally. If
omitted, the latest supported version will be used. omitted, the latest supported version will be used.
``--output=(sender|recipients|count|address)`` .. option:: --output=(sender|recipients|count|address)
Controls which information appears in the output. This option can Controls which information appears in the output. This option can
be given multiple times to combine different outputs. When be given multiple times to combine different outputs. When
neither ``--output=sender`` nor ``--output=recipients`` is neither ``--output=sender`` nor ``--output=recipients`` is
@ -60,7 +65,8 @@ Supported options for **address** include
with names and email addresses. This option has no effect on with names and email addresses. This option has no effect on
the JSON or S-Expression output formats. the JSON or S-Expression output formats.
``--deduplicate=(no|mailbox|address)`` .. option:: --deduplicate=(no|mailbox|address)
Control the deduplication of results. Control the deduplication of results.
**no** **no**
@ -80,7 +86,8 @@ Supported options for **address** include
matching messages. If ``--output=count`` is specified, include all matching messages. If ``--output=count`` is specified, include all
variants in the count. variants in the count.
``--sort=``\ (**newest-first**\ \|\ **oldest-first**) .. option:: --sort=(newest-first|oldest-first)
This option can be used to present results in either chronological This option can be used to present results in either chronological
order (**oldest-first**) or reverse chronological order order (**oldest-first**) or reverse chronological order
(**newest-first**). (**newest-first**).
@ -92,7 +99,8 @@ Supported options for **address** include
specified, this option is ignored and the order of the results is specified, this option is ignored and the order of the results is
unspecified. unspecified.
``--exclude=(true|false)`` .. option:: --exclude=(true|false)
A message is called "excluded" if it matches at least one tag in A message is called "excluded" if it matches at least one tag in
search.exclude\_tags that does not appear explicitly in the search search.exclude\_tags that does not appear explicitly in the search
terms. This option specifies whether to omit excluded messages in terms. This option specifies whether to omit excluded messages in

View file

@ -26,13 +26,17 @@ process (which may be quite long) to protect data integrity.
Supported options for **compact** include Supported options for **compact** include
``--backup=``\ <directory> .. program:: compact
.. option:: --backup=<directory>
Save the current database to the given directory before replacing Save the current database to the given directory before replacing
it with the compacted database. The backup directory must not it with the compacted database. The backup directory must not
exist and it must reside on the same mounted filesystem as the exist and it must reside on the same mounted filesystem as the
current database. current database.
``--quiet`` .. option:: --quiet
Do not report database compaction progress to stdout. Do not report database compaction progress to stdout.
SEE ALSO SEE ALSO

View file

@ -19,12 +19,16 @@ DESCRIPTION
The **config** command can be used to get or set settings in the notmuch The **config** command can be used to get or set settings in the notmuch
configuration file and corresponding database. configuration file and corresponding database.
**get** .. program:: config
.. option:: get
The value of the specified configuration item is printed to The value of the specified configuration item is printed to
stdout. If the item has multiple values (it is a list), each value stdout. If the item has multiple values (it is a list), each value
is separated by a newline character. is separated by a newline character.
**set** .. option:: set
The specified configuration item is set to the given value. To The specified configuration item is set to the given value. To
specify a multiple-value item (a list), provide each value as a specify a multiple-value item (a list), provide each value as a
separate command-line argument. separate command-line argument.
@ -36,7 +40,8 @@ configuration file and corresponding database.
stored in the database, rather than the default (text) stored in the database, rather than the default (text)
configuration file. configuration file.
**list** .. option:: list
Every configuration item is printed to stdout, each on a separate Every configuration item is printed to stdout, each on a separate
line of the form:: line of the form::

View file

@ -24,7 +24,10 @@ See :any:`notmuch-search-terms(7)` for details of the supported syntax for
Supported options for **count** include Supported options for **count** include
``--output=(messages|threads|files)`` .. program:: count
.. option:: --output=(messages|threads|files)
**messages** **messages**
Output the number of matching messages. This is the default. Output the number of matching messages. This is the default.
@ -37,23 +40,27 @@ Supported options for **count** include
messages due to duplicates (i.e. multiple files having the messages due to duplicates (i.e. multiple files having the
same message-id). same message-id).
``--exclude=(true|false)`` .. option:: --exclude=(true|false)
Specify whether to omit messages matching search.exclude\_tags from Specify whether to omit messages matching search.exclude\_tags from
the count (the default) or not. the count (the default) or not.
``--batch`` .. option:: --batch
Read queries from a file (stdin by default), one per line, and Read queries from a file (stdin by default), one per line, and
output the number of matching messages (or threads) to stdout, one output the number of matching messages (or threads) to stdout, one
per line. On an empty input line the count of all messages (or per line. On an empty input line the count of all messages (or
threads) in the database will be output. This option is not threads) in the database will be output. This option is not
compatible with specifying search terms on the command line. compatible with specifying search terms on the command line.
``--lastmod`` .. option:: --lastmod
Append lastmod (counter for number of database updates) and UUID Append lastmod (counter for number of database updates) and UUID
to the output. lastmod values are only comparable between to the output. lastmod values are only comparable between
databases with the same UUID. databases with the same UUID.
``--input=``\ <filename> .. option:: --input=<filename>
Read input from given file, instead of from stdin. Implies Read input from given file, instead of from stdin. Implies
``--batch``. ``--batch``.

View file

@ -28,10 +28,14 @@ the remaining arguments are search terms.
Supported options for **dump** include Supported options for **dump** include
``--gzip`` .. program:: dump
.. option:: --gzip
Compress the output in a format compatible with :manpage:`gzip(1)`. Compress the output in a format compatible with :manpage:`gzip(1)`.
``--format=(sup|batch-tag)`` .. option:: --format=(sup|batch-tag)
Notmuch restore supports two plain text dump formats, both with Notmuch restore supports two plain text dump formats, both with
one message-id per line, followed by a list of tags. one message-id per line, followed by a list of tags.
@ -69,7 +73,8 @@ Supported options for **dump** include
characters. Note also that tags with spaces will not be characters. Note also that tags with spaces will not be
correctly restored with this format. correctly restored with this format.
``--include=(config|properties|tags)`` .. option:: --include=(config|properties|tags)
Control what kind of metadata is included in the output. Control what kind of metadata is included in the output.
**config** **config**
@ -96,7 +101,8 @@ Supported options for **dump** include
where <*included*> is a comma separated list of the above options. where <*included*> is a comma separated list of the above options.
``--output=``\ <filename> .. option:: --output=<filename>
Write output to given file instead of stdout. Write output to given file instead of stdout.
SEE ALSO SEE ALSO

View file

@ -17,49 +17,63 @@ subject, recipients, and message body, or mailto: URL.
Supported options for **emacs-mua** include Supported options for **emacs-mua** include
``-h, --help`` .. program:: emacs-mua
.. option:: -h, --help
Display help. Display help.
``-s, --subject=``\ <subject> .. option:: -s, --subject=<subject>
Specify the subject of the message. Specify the subject of the message.
``--to=``\ <to-address> .. option:: --to=<to-address>
Specify a recipient (To). Specify a recipient (To).
``-c, --cc=``\ <cc-address> .. option:: -c, --cc=<cc-address>
Specify a carbon-copy (Cc) recipient. Specify a carbon-copy (Cc) recipient.
``-b, --bcc=``\ <bcc-address> .. option:: -b, --bcc=<bcc-address>
Specify a blind-carbon-copy (Bcc) recipient. Specify a blind-carbon-copy (Bcc) recipient.
``-i, --body=``\ <file> .. option:: -i, --body=<file>
Specify a file to include into the body of the message. Specify a file to include into the body of the message.
``--hello`` .. option:: --hello
Go to the Notmuch hello screen instead of the message composition Go to the Notmuch hello screen instead of the message composition
window if no message composition parameters are given. window if no message composition parameters are given.
``--no-window-system`` .. option:: --no-window-system
Even if a window system is available, use the current terminal. Even if a window system is available, use the current terminal.
``--client`` .. option:: --client
Use :manpage:`emacsclient(1)`, rather than Use :manpage:`emacsclient(1)`, rather than
:manpage:`emacs(1)`. For :manpage:`emacsclient(1)` to work, you :manpage:`emacs(1)`. For :manpage:`emacsclient(1)` to work, you
need an already running Emacs with a server, or use need an already running Emacs with a server, or use
``--auto-daemon``. ``--auto-daemon``.
``--auto-daemon`` .. option:: --auto-daemon
Automatically start Emacs in daemon mode, if the Emacs server is Automatically start Emacs in daemon mode, if the Emacs server is
not running. Applicable with ``--client``. Implies not running. Applicable with ``--client``. Implies
``--create-frame``. ``--create-frame``.
``--create-frame`` .. option:: --create-frame
Create a new frame instead of trying to use the current Emacs Create a new frame instead of trying to use the current Emacs
frame. Applicable with ``--client``. This will be required when frame. Applicable with ``--client``. This will be required when
Emacs is running (or automatically started with ``--auto-daemon``) Emacs is running (or automatically started with ``--auto-daemon``)
in daemon mode. in daemon mode.
``--print`` .. option:: --print
Output the resulting elisp to stdout instead of evaluating it. Output the resulting elisp to stdout instead of evaluating it.
The supported positional parameters and short options are a compatible The supported positional parameters and short options are a compatible

View file

@ -33,33 +33,41 @@ more details on hooks.
Option arguments must appear before any tag operation arguments. Option arguments must appear before any tag operation arguments.
Supported options for **insert** include Supported options for **insert** include
``--folder=<``\ folder\ **>** .. program:: insert
.. option:: --folder=<folder>
Deliver the message to the specified folder, relative to the Deliver the message to the specified folder, relative to the
top-level directory given by the value of **database.path**. The top-level directory given by the value of **database.path**. The
default is the empty string, which means delivering to the default is the empty string, which means delivering to the
top-level directory. top-level directory.
``--create-folder`` .. option:: --create-folder
Try to create the folder named by the ``--folder`` option, if it Try to create the folder named by the ``--folder`` option, if it
does not exist. Otherwise the folder must already exist for mail does not exist. Otherwise the folder must already exist for mail
delivery to succeed. delivery to succeed.
``--keep`` .. option:: --keep
Keep the message file if indexing fails, and keep the message Keep the message file if indexing fails, and keep the message
indexed if applying tags or maildir flag synchronization indexed if applying tags or maildir flag synchronization
fails. Ignore these errors and return exit status 0 to indicate fails. Ignore these errors and return exit status 0 to indicate
successful mail delivery. successful mail delivery.
``--no-hooks`` .. option:: --no-hooks
Prevent hooks from being run. Prevent hooks from being run.
``--world-readable`` .. option:: --world-readable
When writing mail to the mailbox, allow it to be read by users When writing mail to the mailbox, allow it to be read by users
other than the current user. Note that this does not override other than the current user. Note that this does not override
umask. By default, delivered mail is only readable by the current umask. By default, delivered mail is only readable by the current
user. user.
``--decrypt=(true|nostash|auto|false)`` .. option:: --decrypt=(true|nostash|auto|false)
If ``true`` and the message is encrypted, try to decrypt the If ``true`` and the message is encrypted, try to decrypt the
message while indexing, stashing any session keys discovered. If message while indexing, stashing any session keys discovered. If
``auto``, and notmuch already knows about a session key for the ``auto``, and notmuch already knows about a session key for the

View file

@ -40,17 +40,23 @@ details on hooks.
Supported options for **new** include Supported options for **new** include
``--no-hooks`` .. program:: new
.. option:: --no-hooks
Prevents hooks from being run. Prevents hooks from being run.
``--quiet`` .. option:: --quiet
Do not print progress or results. Do not print progress or results.
``--verbose`` .. option:: --verbose
Print file names being processed. Ignored when combined with Print file names being processed. Ignored when combined with
``--quiet``. ``--quiet``.
``--decrypt=(true|nostash|auto|false)`` .. option:: --decrypt=(true|nostash|auto|false)
If ``true``, when encountering an encrypted message, try to If ``true``, when encountering an encrypted message, try to
decrypt it while indexing, and stash any discovered session keys. decrypt it while indexing, and stash any discovered session keys.
If ``auto``, try to use any session key already known to belong to If ``auto``, try to use any session key already known to belong to
@ -66,7 +72,8 @@ Supported options for **new** include
See also ``index.decrypt`` in :any:`notmuch-config(1)`. See also ``index.decrypt`` in :any:`notmuch-config(1)`.
``--full-scan`` .. option:: --full-scan
By default notmuch-new uses directory modification times (mtimes) By default notmuch-new uses directory modification times (mtimes)
to optimize the scanning of directories for new mail. This option turns to optimize the scanning of directories for new mail. This option turns
that optimization off. that optimization off.

View file

@ -23,7 +23,10 @@ messages using the supplied options.
Supported options for **reindex** include Supported options for **reindex** include
``--decrypt=(true|nostash|auto|false)`` .. program:: reindex
.. option:: --decrypt=(true|nostash|auto|false)
If ``true``, when encountering an encrypted message, try to If ``true``, when encountering an encrypted message, try to
decrypt it while reindexing, stashing any session keys discovered. decrypt it while reindexing, stashing any session keys discovered.
If ``auto``, and notmuch already knows about a session key for the If ``auto``, and notmuch already knows about a session key for the

View file

@ -36,7 +36,10 @@ The resulting message template is output to stdout.
Supported options for **reply** include Supported options for **reply** include
``--format=``\ (**default**\ \|\ **json**\ \|\ **sexp**\ \|\ **headers-only**) .. program:: reply
.. option:: --format=(default|json|sexp|headers-only)
**default** **default**
Includes subject and quoted message body as an RFC 2822 Includes subject and quoted message body as an RFC 2822
message. message.
@ -56,12 +59,14 @@ Supported options for **reply** include
Only produces In-Reply-To, References, To, Cc, and Bcc Only produces In-Reply-To, References, To, Cc, and Bcc
headers. headers.
``--format-version=N`` .. option:: --format-version=N
Use the specified structured output format version. This is Use the specified structured output format version. This is
intended for programs that invoke :any:`notmuch(1)` internally. If intended for programs that invoke :any:`notmuch(1)` internally. If
omitted, the latest supported version will be used. omitted, the latest supported version will be used.
``--reply-to=``\ (**all**\ \|\ **sender**) .. option:: --reply-to=(all|sender)
**all** (default) **all** (default)
Replies to all addresses. Replies to all addresses.
@ -72,7 +77,7 @@ Supported options for **reply** include
order, and copy values from the first that contains something order, and copy values from the first that contains something
other than only the user's addresses. other than only the user's addresses.
``--decrypt=(false|auto|true)`` .. option:: --decrypt=(false|auto|true)
If ``true``, decrypt any MIME encrypted parts found in the If ``true``, decrypt any MIME encrypted parts found in the
selected content (i.e., "multipart/encrypted" parts). Status selected content (i.e., "multipart/encrypted" parts). Status

View file

@ -18,12 +18,16 @@ The input is read from the given filename, if any, or from stdin.
Supported options for **restore** include Supported options for **restore** include
``--accumulate`` .. program:: restore
.. option:: --accumulate
The union of the existing and new tags is applied, instead of The union of the existing and new tags is applied, instead of
replacing each message's tags as they are read in from the dump replacing each message's tags as they are read in from the dump
file. file.
``--format=(sup|batch-tag|auto)`` .. option:: --format=(sup|batch-tag|auto)
Notmuch restore supports two plain text dump formats, with each Notmuch restore supports two plain text dump formats, with each
line specifying a message-id and a set of tags. For details of the line specifying a message-id and a set of tags. For details of the
actual formats, see :any:`notmuch-dump(1)`. actual formats, see :any:`notmuch-dump(1)`.
@ -51,7 +55,8 @@ Supported options for **restore** include
this heuristic, based the fact that batch-tag format contains this heuristic, based the fact that batch-tag format contains
no parentheses, should be accurate. no parentheses, should be accurate.
``--include=(config|properties|tags)`` .. option:: --include=(config|properties|tags)
Control what kind of metadata is restored. Control what kind of metadata is restored.
**config** **config**
@ -72,7 +77,8 @@ Supported options for **restore** include
The default is to restore all available types of data. The option The default is to restore all available types of data. The option
can be specified multiple times to select some subset. can be specified multiple times to select some subset.
``--input=``\ <filename> .. option:: --input=<filename>
Read input from given file instead of stdin. Read input from given file instead of stdin.
GZIPPED INPUT GZIPPED INPUT

View file

@ -26,18 +26,23 @@ See :any:`notmuch-search-terms(7)` for details of the supported syntax for
Supported options for **search** include Supported options for **search** include
``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**) .. program:: search
.. option:: --format=(json|sexp|text|text0)
Presents the results in either JSON, S-Expressions, newline Presents the results in either JSON, S-Expressions, newline
character separated plain-text (default), or null character character separated plain-text (default), or null character
separated plain-text (compatible with :manpage:`xargs(1)` -0 separated plain-text (compatible with :manpage:`xargs(1)` -0
option where available). option where available).
``--format-version=N`` .. option:: --format-version=N
Use the specified structured output format version. This is Use the specified structured output format version. This is
intended for programs that invoke :any:`notmuch(1)` internally. If intended for programs that invoke :any:`notmuch(1)` internally. If
omitted, the latest supported version will be used. omitted, the latest supported version will be used.
``--output=(summary|threads|messages|files|tags)`` .. option:: --output=(summary|threads|messages|files|tags)
**summary** **summary**
Output a summary of each thread with any message matching the Output a summary of each thread with any message matching the
search terms. The summary includes the thread ID, date, the search terms. The summary includes the thread ID, date, the
@ -79,7 +84,8 @@ Supported options for **search** include
characters (``--format=text0``), as a JSON array (``--format=json``), characters (``--format=text0``), as a JSON array (``--format=json``),
or as an S-Expression list (``--format=sexp``). or as an S-Expression list (``--format=sexp``).
``--sort=``\ (**newest-first**\ \|\ **oldest-first**) .. option:: --sort=(newest-first|oldest-first)
This option can be used to present results in either chronological This option can be used to present results in either chronological
order (**oldest-first**) or reverse chronological order order (**oldest-first**) or reverse chronological order
(**newest-first**). (**newest-first**).
@ -93,14 +99,17 @@ Supported options for **search** include
By default, results will be displayed in reverse chronological By default, results will be displayed in reverse chronological
order, (that is, the newest results will be displayed first). order, (that is, the newest results will be displayed first).
``--offset=[-]N`` .. option:: --offset=[-]N
Skip displaying the first N results. With the leading '-', start Skip displaying the first N results. With the leading '-', start
at the Nth result from the end. at the Nth result from the end.
``--limit=N`` .. option:: --limit=N
Limit the number of displayed results to N. Limit the number of displayed results to N.
``--exclude=(true|false|all|flag)`` .. option:: --exclude=(true|false|all|flag)
A message is called "excluded" if it matches at least one tag in A message is called "excluded" if it matches at least one tag in
search.exclude\_tags that does not appear explicitly in the search search.exclude\_tags that does not appear explicitly in the search
terms. This option specifies whether to omit excluded messages in terms. This option specifies whether to omit excluded messages in
@ -125,7 +134,8 @@ Supported options for **search** include
number of matching non-excluded messages in the thread, rather number of matching non-excluded messages in the thread, rather
than the number of matching messages. than the number of matching messages.
``--duplicate=N`` .. option:: --duplicate=N
For ``--output=files``, output the Nth filename associated with For ``--output=files``, output the Nth filename associated with
each message matching the query (N is 1-based). If N is greater each message matching the query (N is 1-based). If N is greater
than the number of files associated with the message, don't print than the number of files associated with the message, don't print

View file

@ -25,13 +25,17 @@ post-processor (such as the emacs interface to notmuch).
Supported options for **show** include Supported options for **show** include
``--entire-thread=(true|false)`` .. program:: show
.. option:: --entire-thread=(true|false)
If true, **notmuch show** outputs all messages in the thread of If true, **notmuch show** outputs all messages in the thread of
any message matching the search terms; if false, it outputs only any message matching the search terms; if false, it outputs only
the matching messages. For ``--format=json`` and ``--format=sexp`` the matching messages. For ``--format=json`` and ``--format=sexp``
this defaults to true. For other formats, this defaults to false. this defaults to true. For other formats, this defaults to false.
``--format=(text|json|sexp|mbox|raw)`` .. option:: --format=(text|json|sexp|mbox|raw)
**text** (default for messages) **text** (default for messages)
The default plain-text format has all text-content MIME parts The default plain-text format has all text-content MIME parts
decoded. Various components in the output, (**message**, decoded. Various components in the output, (**message**,
@ -90,12 +94,14 @@ Supported options for **show** include
of this may need to implement MIME decoding and similar of this may need to implement MIME decoding and similar
functions. functions.
``--format-version=N`` .. option:: --format-version=N
Use the specified structured output format version. This is Use the specified structured output format version. This is
intended for programs that invoke :any:`notmuch(1)` internally. If intended for programs that invoke :any:`notmuch(1)` internally. If
omitted, the latest supported version will be used. omitted, the latest supported version will be used.
``--part=N`` .. option:: --part=N
Output the single decoded MIME part N of a single message. The Output the single decoded MIME part N of a single message. The
search terms must match only a single message. Message parts are search terms must match only a single message. Message parts are
numbered in a depth-first walk of the message MIME structure, and numbered in a depth-first walk of the message MIME structure, and
@ -105,14 +111,16 @@ Supported options for **show** include
part still has two MIME parts: part 0 is the whole message part still has two MIME parts: part 0 is the whole message
(headers and body) and part 1 is just the body. (headers and body) and part 1 is just the body.
``--verify`` .. option:: --verify
Compute and report the validity of any MIME cryptographic Compute and report the validity of any MIME cryptographic
signatures found in the selected content (e.g., "multipart/signed" signatures found in the selected content (e.g., "multipart/signed"
parts). Status of the signature will be reported (currently only parts). Status of the signature will be reported (currently only
supported with ``--format=json`` and ``--format=sexp``), and the supported with ``--format=json`` and ``--format=sexp``), and the
multipart/signed part will be replaced by the signed data. multipart/signed part will be replaced by the signed data.
``--decrypt=(false|auto|true|stash)`` .. option:: --decrypt=(false|auto|true|stash)
If ``true``, decrypt any MIME encrypted parts found in the If ``true``, decrypt any MIME encrypted parts found in the
selected content (e.g., "multipart/encrypted" parts). Status of selected content (e.g., "multipart/encrypted" parts). Status of
the decryption will be reported (currently only supported the decryption will be reported (currently only supported
@ -162,7 +170,8 @@ Supported options for **show** include
Default: ``auto`` Default: ``auto``
``--exclude=(true|false)`` .. option:: --exclude=(true|false)
Specify whether to omit threads only matching search.exclude\_tags Specify whether to omit threads only matching search.exclude\_tags
from the search results (the default) or not. In either case the from the search results (the default) or not. In either case the
excluded message will be marked with the exclude flag (except when excluded message will be marked with the exclude flag (except when
@ -175,7 +184,8 @@ Supported options for **show** include
The default is ``--exclude=true.`` The default is ``--exclude=true.``
``--body=(true|false)`` .. option:: --body=(true|false)
If true (the default) **notmuch show** includes the bodies of the If true (the default) **notmuch show** includes the bodies of the
messages in the output; if false, bodies are omitted. messages in the output; if false, bodies are omitted.
``--body=false`` is only implemented for the text, json and sexp ``--body=false`` is only implemented for the text, json and sexp
@ -184,7 +194,8 @@ Supported options for **show** include
This is useful if the caller only needs the headers as body-less This is useful if the caller only needs the headers as body-less
output is much faster and substantially smaller. output is much faster and substantially smaller.
``--include-html`` .. option:: --include-html
Include "text/html" parts as part of the output (currently Include "text/html" parts as part of the output (currently
only supported with ``--format=text``, ``--format=json`` and only supported with ``--format=text``, ``--format=json`` and
``--format=sexp``). By default, unless ``--part=N`` is used to ``--format=sexp``). By default, unless ``--part=N`` is used to

View file

@ -34,20 +34,25 @@ the **maildir.synchronize\_flags** configuration option is enabled. See
Supported options for **tag** include Supported options for **tag** include
``--remove-all`` .. program:: tag
.. option:: --remove-all
Remove all tags from each message matching the search terms before Remove all tags from each message matching the search terms before
applying the tag changes appearing on the command line. This applying the tag changes appearing on the command line. This
means setting the tags of each message to the tags to be added. If means setting the tags of each message to the tags to be added. If
there are no tags to be added, the messages will have no tags. there are no tags to be added, the messages will have no tags.
``--batch`` .. option:: --batch
Read batch tagging operations from a file (stdin by default). Read batch tagging operations from a file (stdin by default).
This is more efficient than repeated **notmuch tag** This is more efficient than repeated **notmuch tag**
invocations. See `TAG FILE FORMAT <#tag_file_format>`__ below for invocations. See `TAG FILE FORMAT <#tag_file_format>`__ below for
the input format. This option is not compatible with specifying the input format. This option is not compatible with specifying
tagging on the command line. tagging on the command line.
``--input=``\ <filename> .. option:: --input=<filename>
Read input from given file, instead of from stdin. Implies Read input from given file, instead of from stdin. Implies
``--batch``. ``--batch``.

View file

@ -43,20 +43,26 @@ OPTIONS
Supported global options for ``notmuch`` include Supported global options for ``notmuch`` include
``--help`` [command-name] .. program:: notmuch
.. option:: --help [command-name]
Print a synopsis of available commands and exit. With an optional Print a synopsis of available commands and exit. With an optional
command name, show the man page for that subcommand. command name, show the man page for that subcommand.
``--version`` .. option:: --version
Print the installed version of notmuch, and exit. Print the installed version of notmuch, and exit.
``--config=FILE`` .. option:: --config=FILE
Specify the configuration file to use. This overrides any Specify the configuration file to use. This overrides any
configuration file specified by :envvar:`NOTMUCH_CONFIG`. The empty configuration file specified by :envvar:`NOTMUCH_CONFIG`. The empty
string is a permitted and sometimes useful value of *FILE*, which string is a permitted and sometimes useful value of *FILE*, which
tells ``notmuch`` to use only configuration metadata from the database. tells ``notmuch`` to use only configuration metadata from the database.
``--uuid=HEX`` .. option:: --uuid=HEX
Enforce that the database UUID (a unique identifier which persists Enforce that the database UUID (a unique identifier which persists
until e.g. the database is compacted) is HEX; exit with an error until e.g. the database is compacted) is HEX; exit with an error
if it is not. This is useful to detect rollover in modification if it is not. This is useful to detect rollover in modification