cli: search: Add --output={sender,recipients}
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 31 Oct 2014 21:53:58 +0000 (22:53 +0100)
committerDavid Bremner <david@tethera.net>
Sat, 1 Nov 2014 07:02:58 +0000 (08:02 +0100)
commit3cc8ed5978157e26cf302ca5b1c9669efeb9ee44
tree3e89f74ae9fedda87803806e1fe96bbc16e87c33
parentdb307459fbc32c39f61fc894d8e77051d59dbf9b
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.
completion/notmuch-completion.bash
completion/notmuch-completion.zsh
doc/man1/notmuch-search.rst
notmuch-search.c