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 'reply:constructs a reply template for a set of messages'
14 'show:show all messages matching the search terms'
15 'tag:add or remove tags for all messages matching the search terms'
16 'dump:creates a plain-text dump of the tags of each message'
17 'restore:restores the tags from the given file'
18 'help:show details on a command'
21 _describe -t command 'command' notmuch_commands
29 _notmuch_help_topics()
31 local -a notmuch_help_topics
33 'search-terms:show common search-terms syntax'
35 _describe -t notmuch-help-topics 'topic' notmuch_help_topics
53 '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \
54 '--first=[omit the first x threads from the search results]:number of threads to omit: ' \
55 '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))'
60 if (( CURRENT > 2 )) ; then
62 curcontext="${curcontext%:*:*}:notmuch-$cmd"
65 _call_function ret _notmuch_$cmd
74 # vim: set sw=2 sts=2 ts=2 et ft=zsh :