Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 30 / 1595e463ddcd24b5a252a016ab2ca9b5bc983e
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
29 Precedence: list\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
40 \r
41 Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>\r
42 ---\r
43  _notmuch |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
44  1 files changed, 74 insertions(+), 0 deletions(-)\r
45  create mode 100644 _notmuch\r
46 \r
47 diff --git a/_notmuch b/_notmuch\r
48 new file mode 100644\r
49 index 0000000..00c9248\r
50 --- /dev/null\r
51 +++ b/_notmuch\r
52 @@ -0,0 +1,74 @@\r
53 +#compdef notmuch\r
54 +\r
55 +# ZSH completion for `notmuch`\r
56 +# Copyright 2009 Ingmar Vanhassel <ingmar@exherbo.org>\r
57 +\r
58 +_notmuch_commands()\r
59 +{\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
71 +  )\r
72 +\r
73 +  _describe -t command 'command' notmuch_commands\r
74 +}\r
75 +\r
76 +_notmuch_dump()\r
77 +{\r
78 +  _files\r
79 +}\r
80 +\r
81 +_notmuch_help_topics()\r
82 +{\r
83 +  local -a notmuch_help_topics\r
84 +  notmuch_help_topics=(\r
85 +    'search-terms:show common search-terms syntax'\r
86 +  )\r
87 +  _describe -t notmuch-help-topics 'topic' notmuch_help_topics\r
88 +}\r
89 +\r
90 +_notmuch_help()\r
91 +{\r
92 +  _alternative \\r
93 +    _notmuch_commands \\r
94 +    _notmuch_help_topics\r
95 +}\r
96 +\r
97 +_notmuch_restore()\r
98 +{\r
99 +  _files\r
100 +}\r
101 +\r
102 +_notmuch_search()\r
103 +{\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
108 +}\r
109 +\r
110 +_notmuch()\r
111 +{\r
112 +  if (( CURRENT > 2 )) ; then\r
113 +    local cmd=${words[2]}\r
114 +    curcontext="${curcontext%:*:*}:notmuch-$cmd"\r
115 +    (( CURRENT-- ))\r
116 +    shift words\r
117 +    _call_function ret _notmuch_$cmd\r
118 +    return ret\r
119 +  else\r
120 +    _notmuch_commands\r
121 +  fi\r
122 +}\r
123 +\r
124 +_notmuch "$@"\r
125 +\r
126 +# vim: set sw=2 sts=2 ts=2 et ft=zsh :\r
127 -- \r
128 1.6.5.2.433.g23cdb\r
129 \r