diff options
| author | Michal Sojka <sojkam1@fel.cvut.cz> | 2014-10-31 22:53:58 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2014-11-01 08:02:58 +0100 |
| commit | 3cc8ed5978157e26cf302ca5b1c9669efeb9ee44 (patch) | |
| tree | 3e89f74ae9fedda87803806e1fe96bbc16e87c33 /completion | |
| parent | db307459fbc32c39f61fc894d8e77051d59dbf9b (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 'completion')
| -rw-r--r-- | completion/notmuch-completion.bash | 2 | ||||
| -rw-r--r-- | completion/notmuch-completion.zsh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 0571dc9d..cfbd3890 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -294,7 +294,7 @@ _notmuch_search() return ;; --output) - COMPREPLY=( $( compgen -W "summary threads messages files tags" -- "${cur}" ) ) + COMPREPLY=( $( compgen -W "summary threads messages files tags sender recipients" -- "${cur}" ) ) return ;; --sort) diff --git a/completion/notmuch-completion.zsh b/completion/notmuch-completion.zsh index 67a9aba8..3e52a004 100644 --- a/completion/notmuch-completion.zsh +++ b/completion/notmuch-completion.zsh @@ -52,7 +52,8 @@ _notmuch_search() _arguments -s : \ '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \ '--first=[omit the first x threads from the search results]:number of threads to omit: ' \ - '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' + '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \ + '--output=[select what to output]:output:((summary threads messages files tags sender recipients))' } _notmuch() |
