3 # ZSH completion for `notmuch`
4 # Copyright © 2009 Ingmar Vanhassel <ingmar@exherbo.org>
8 local -a notmuch_commands
10 'setup:interactively set up notmuch for first use'
11 'new:find and import any new message to the database'
12 'search:search for messages matching the search terms, display matching threads as results'
13 'address:get addresses from messages matching the given search terms'
14 'reply:constructs a reply template for a set of messages'
15 'show:show all messages matching the search terms'
16 'tag:add or remove tags for all messages matching the search terms'
17 'dump:creates a plain-text dump of the tags of each message'
18 'restore:restores the tags from the given file'
19 'help:show details on a command'
22 _describe -t command 'command' notmuch_commands
30 _notmuch_help_topics()
32 local -a notmuch_help_topics
34 'search-terms:show common search-terms syntax'
36 _describe -t notmuch-help-topics 'topic' notmuch_help_topics
54 '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \
55 '--first=[omit the first x threads from the search results]:number of threads to omit: ' \
56 '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \
57 '--output=[select what to output]:output:((summary threads messages files tags))'
63 '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \
64 '--output=[select what to output]:output:((sender recipients count))'
69 if (( CURRENT > 2 )) ; then
71 curcontext="${curcontext%:*:*}:notmuch-$cmd"
74 _call_function ret _notmuch_$cmd
83 # vim: set sw=2 sts=2 ts=2 et ft=zsh :