3 # ZSH completion for `notmuch`
4 # Copyright © 2009 Ingmar Vanhassel <ingmar@exherbo.org>
8 local -a notmuch_commands
10 'help:display documentation for a subcommand'
11 'setup:interactively configure notmuch'
13 'address:output addresses from matching messages'
14 'compact:compact the notmuch database'
15 'config:access notmuch configuration file'
16 'count:count messages matching the given search terms'
17 'dump:creates a plain-text dump of the tags of each message'
18 'insert:add a message to the maildir and notmuch database'
19 'new:incorporate new mail into the notmuch database'
20 'reply:constructs a reply template for a set of messages'
21 'restore:restores the tags from the given file (see notmuch dump)'
22 'search:search for messages matching the given search terms'
23 'show:show messages matching the given search terms'
24 'tag:add/remove tags for all messages matching the search terms'
27 _describe -t command 'command' notmuch_commands
35 _notmuch_help_topics()
37 local -a notmuch_help_topics
39 'search-terms:show common search-terms syntax'
41 _describe -t notmuch-help-topics 'topic' notmuch_help_topics
59 '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \
60 '--first=[omit the first x threads from the search results]:number of threads to omit: ' \
61 '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \
62 '--output=[select what to output]:output:((summary threads messages files tags))'
68 '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' \
69 '--output=[select what to output]:output:((sender recipients count))'
74 if (( CURRENT > 2 )) ; then
76 curcontext="${curcontext%:*:*}:notmuch-$cmd"
79 _call_function ret _notmuch_$cmd
88 # vim: set sw=2 sts=2 ts=2 et ft=zsh :