1 Return-Path: <ingmar@exherbo.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id A7733431FBF
\r
6 for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 14:50:58 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id SgJqAi+RQrD7 for <notmuch@notmuchmail.org>;
\r
11 Wed, 18 Nov 2009 14:50:57 -0800 (PST)
\r
12 X-Greylist: delayed 84428 seconds by postgrey-1.32 at olra;
\r
13 Wed, 18 Nov 2009 14:50:57 PST
\r
14 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])
\r
15 by olra.theworths.org (Postfix) with ESMTP id A6D2D431FBC
\r
16 for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 14:50:57 -0800 (PST)
\r
17 Received: from [83.101.72.69] (helo=localhost)
\r
18 by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69)
\r
19 (envelope-from <ingmar@exherbo.org>)
\r
20 id 1NAtMV-0005Kc-2e; Wed, 18 Nov 2009 22:50:55 +0000
\r
21 From: Ingmar Vanhassel <ingmar@exherbo.org>
\r
22 To: <notmuch@notmuchmail.org>
\r
23 Date: Wed, 18 Nov 2009 23:50:40 +0100
\r
24 Message-Id: <1258584640-29221-1-git-send-email-ingmar@exherbo.org>
\r
25 X-Mailer: git-send-email 1.6.5.2.433.g23cdb
\r
26 Subject: [notmuch] [PATCH 1/2] zsh: Initial zsh-completion for notmuch
\r
27 X-BeenThere: notmuch@notmuchmail.org
\r
28 X-Mailman-Version: 2.1.12
\r
30 List-Id: "Use and development of the notmuch mail system."
\r
31 <notmuch.notmuchmail.org>
\r
32 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
33 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
34 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
35 List-Post: <mailto:notmuch@notmuchmail.org>
\r
36 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
37 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
39 X-List-Received-Date: Wed, 18 Nov 2009 22:50:58 -0000
\r
41 Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
\r
43 _notmuch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
\r
44 1 files changed, 74 insertions(+), 0 deletions(-)
\r
45 create mode 100644 _notmuch
\r
47 diff --git a/_notmuch b/_notmuch
\r
48 new file mode 100644
\r
49 index 0000000..00c9248
\r
55 +# ZSH completion for `notmuch`
\r
56 +# Copyright 2009 Ingmar Vanhassel <ingmar@exherbo.org>
\r
58 +_notmuch_commands()
\r
60 + local -a notmuch_commands
\r
61 + notmuch_commands=(
\r
62 + 'setup:interactively set up notmuch for first use'
\r
63 + 'new:find and import any new message to the database'
\r
64 + 'search:search for messages matching the search terms, display matching threads as results'
\r
65 + 'reply:constructs a reply template for a set of messages'
\r
66 + 'show:show all messages matching the search terms'
\r
67 + 'tag:add or remove tags for all messages matching the search terms'
\r
68 + 'dump:creates a plain-text dump of the tags of each message'
\r
69 + 'restore:restores the tags from the given file'
\r
70 + 'help:show details on a command'
\r
73 + _describe -t command 'command' notmuch_commands
\r
81 +_notmuch_help_topics()
\r
83 + local -a notmuch_help_topics
\r
84 + notmuch_help_topics=(
\r
85 + 'search-terms:show common search-terms syntax'
\r
87 + _describe -t notmuch-help-topics 'topic' notmuch_help_topics
\r
93 + _notmuch_commands \
\r
94 + _notmuch_help_topics
\r
104 + _arguments -s : \
\r
105 + '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \
\r
106 + '--first=[omit the first x threads from the search results]:number of threads to omit: ' \
\r
107 + '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))'
\r
112 + if (( CURRENT > 2 )) ; then
\r
113 + local cmd=${words[2]}
\r
114 + curcontext="${curcontext%:*:*}:notmuch-$cmd"
\r
117 + _call_function ret _notmuch_$cmd
\r
120 + _notmuch_commands
\r
126 +# vim: set sw=2 sts=2 ts=2 et ft=zsh :
\r