aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichal Sojka <sojkam1@fel.cvut.cz>2014-10-31 22:53:58 +0100
committerDavid Bremner <david@tethera.net>2014-11-01 08:02:58 +0100
commit3cc8ed5978157e26cf302ca5b1c9669efeb9ee44 (patch)
tree3e89f74ae9fedda87803806e1fe96bbc16e87c33 /doc
parentdb307459fbc32c39f61fc894d8e77051d59dbf9b (diff)
cli: search: Add --output={sender,recipients}
The new outputs allow printing senders, recipients or both of matching messages. To print both, the user can use --output=sender and --output=recipients simultaneously. Currently, the same address can appear multiple times in the output. The next commit will change this. For this reason, tests are introduced there. We use mailbox_t rather than InternetAddressMailbox because we will need to extend it in a following commit. This code is based on a patch from Jani Nikula.
Diffstat (limited to 'doc')
-rw-r--r--doc/man1/notmuch-search.rst22
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/man1/notmuch-search.rst b/doc/man1/notmuch-search.rst
index 90160f21..b6607c92 100644
--- a/doc/man1/notmuch-search.rst
+++ b/doc/man1/notmuch-search.rst
@@ -35,7 +35,7 @@ Supported options for **search** include
intended for programs that invoke **notmuch(1)** internally. If
omitted, the latest supported version will be used.
- ``--output=(summary|threads|messages|files|tags)``
+ ``--output=(summary|threads|messages|files|tags|sender|recipients)``
**summary**
Output a summary of each thread with any message matching
@@ -78,6 +78,26 @@ Supported options for **search** include
by null characters (--format=text0), as a JSON array
(--format=json), or as an S-Expression list (--format=sexp).
+ **sender**
+ Output all addresses from the *From* header that appear on
+ any message matching the search terms, either one per line
+ (--format=text), separated by null characters
+ (--format=text0), as a JSON array (--format=json), or as
+ an S-Expression list (--format=sexp).
+
+ Note: Searching for **sender** should be much faster than
+ searching for **recipients**, because sender addresses are
+ cached directly in the database whereas other addresses
+ need to be fetched from message files.
+
+ **recipients**
+ Like **sender** but for addresses from *To*, *Cc* and
+ *Bcc* headers.
+
+ This option can be given multiple times to combine different
+ outputs. Currently, this is only supported for **sender** and
+ **recipients** outputs.
+
``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
This option can be used to present results in either
chronological order (**oldest-first**) or reverse chronological