[PATCH v3 0/4] notmuch search --output=sender/recipients

2014-10-12 Thread Michal Sojka
Hi, this is a third version of my adaptation of Jani's patch series adding --output=sender/recipients and related arguments to notmuch search. The 1st patch is the same as in v2 (Marked as OK in id:m24mvht4c4@guru.guru-group.fi). The 2nd patch is not changed as well, but in v2 it was patch

[PATCH v3 2/4] cli: Add support for parsing multiple keyword arguments

2014-10-12 Thread Michal Sojka
From: Jani Nikula j...@nikula.org This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 +

[PATCH v3 1/4] cli: Refactor option passing in the search command

2014-10-12 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following patches. --- notmuch-search.c | 122

[PATCH v3 4/4] cli: Add an option to filter our duplicate addresses

2014-10-12 Thread Michal Sojka
This adds a --filter-by option to notmuch search. It can be used to filter out duplicate addresses in --output=sender/receivers. The code here is an extended version of a patch from Jani Nikula. --- completion/notmuch-completion.bash | 6 ++- completion/notmuch-completion.zsh | 3 +-

[PATCH v3 3/4] cli: Extend the search command for --output={sender, recipients}

2014-10-12 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. The --output option is converted from keyword argument to flags argument, which means that the user can use --output=sender and --output=recipients simultaneously, to print both. Other combinations produce an error.