[PATCH 05/11] cli/insert: clean up sync_dir
[notmuch-archives.git] / 53 / 1e3904cf5bde20e3a5b2483082669a40361064
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 A3C71431FBC\r
6         for <notmuch@notmuchmail.org>; Fri, 20 Nov 2009 05:36:20 -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 bgvMiUvrKo3D for <notmuch@notmuchmail.org>;\r
11         Fri, 20 Nov 2009 05:36:20 -0800 (PST)\r
12 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])\r
13         by olra.theworths.org (Postfix) with ESMTP id C30AA431FAE\r
14         for <notmuch@notmuchmail.org>; Fri, 20 Nov 2009 05:36:19 -0800 (PST)\r
15 Received: from [83.101.72.69] (helo=localhost)\r
16         by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69)\r
17         (envelope-from <ingmar@exherbo.org>)\r
18         id 1NBTes-00046N-QL; Fri, 20 Nov 2009 13:36:19 +0000\r
19 From: Ingmar Vanhassel <ingmar@exherbo.org>\r
20 To: <notmuch@notmuchmail.org>\r
21 Date: Fri, 20 Nov 2009 14:36:13 +0100\r
22 Message-Id: <1258724174-18684-1-git-send-email-ingmar@exherbo.org>\r
23 X-Mailer: git-send-email 1.6.5.2.433.g23cdb\r
24 In-Reply-To: <87fx8b72vs.fsf@yoom.home.cworth.org>\r
25 References: <87fx8b72vs.fsf@yoom.home.cworth.org>\r
26 Subject: [notmuch] [PATCH 1/2] zsh-completion: Initial zsh-completion for\r
27         notmuch\r
28 X-BeenThere: notmuch@notmuchmail.org\r
29 X-Mailman-Version: 2.1.12\r
30 Precedence: list\r
31 List-Id: "Use and development of the notmuch mail system."\r
32         <notmuch.notmuchmail.org>\r
33 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
34         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
35 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
36 List-Post: <mailto:notmuch@notmuchmail.org>\r
37 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
38 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
40 X-List-Received-Date: Fri, 20 Nov 2009 13:36:20 -0000\r
41 \r
42 Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>\r
43 ---\r
44  contrib/notmuch-completion.zsh |   74 ++++++++++++++++++++++++++++++++++++++++\r
45  1 files changed, 74 insertions(+), 0 deletions(-)\r
46  create mode 100644 contrib/notmuch-completion.zsh\r
47 \r
48 Moved & renamed as you suggested.\r
49 \r
50 diff --git a/contrib/notmuch-completion.zsh b/contrib/notmuch-completion.zsh\r
51 new file mode 100644\r
52 index 0000000..67a9aba\r
53 --- /dev/null\r
54 +++ b/contrib/notmuch-completion.zsh\r
55 @@ -0,0 +1,74 @@\r
56 +#compdef notmuch\r
57 +\r
58 +# ZSH completion for `notmuch`\r
59 +# Copyright © 2009 Ingmar Vanhassel <ingmar@exherbo.org>\r
60 +\r
61 +_notmuch_commands()\r
62 +{\r
63 +  local -a notmuch_commands\r
64 +  notmuch_commands=(\r
65 +    'setup:interactively set up notmuch for first use'\r
66 +    'new:find and import any new message to the database'\r
67 +    'search:search for messages matching the search terms, display matching threads as results'\r
68 +    'reply:constructs a reply template for a set of messages'\r
69 +    'show:show all messages matching the search terms'\r
70 +    'tag:add or remove tags for all messages matching the search terms'\r
71 +    'dump:creates a plain-text dump of the tags of each message'\r
72 +    'restore:restores the tags from the given file'\r
73 +    'help:show details on a command'\r
74 +  )\r
75 +\r
76 +  _describe -t command 'command' notmuch_commands\r
77 +}\r
78 +\r
79 +_notmuch_dump()\r
80 +{\r
81 +  _files\r
82 +}\r
83 +\r
84 +_notmuch_help_topics()\r
85 +{\r
86 +  local -a notmuch_help_topics\r
87 +  notmuch_help_topics=(\r
88 +    'search-terms:show common search-terms syntax'\r
89 +  )\r
90 +  _describe -t notmuch-help-topics 'topic' notmuch_help_topics\r
91 +}\r
92 +\r
93 +_notmuch_help()\r
94 +{\r
95 +  _alternative \\r
96 +    _notmuch_commands \\r
97 +    _notmuch_help_topics\r
98 +}\r
99 +\r
100 +_notmuch_restore()\r
101 +{\r
102 +  _files\r
103 +}\r
104 +\r
105 +_notmuch_search()\r
106 +{\r
107 +  _arguments -s : \\r
108 +    '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \\r
109 +    '--first=[omit the first x threads from the search results]:number of threads to omit: ' \\r
110 +    '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))'\r
111 +}\r
112 +\r
113 +_notmuch()\r
114 +{\r
115 +  if (( CURRENT > 2 )) ; then\r
116 +    local cmd=${words[2]}\r
117 +    curcontext="${curcontext%:*:*}:notmuch-$cmd"\r
118 +    (( CURRENT-- ))\r
119 +    shift words\r
120 +    _call_function ret _notmuch_$cmd\r
121 +    return ret\r
122 +  else\r
123 +    _notmuch_commands\r
124 +  fi\r
125 +}\r
126 +\r
127 +_notmuch "$@"\r
128 +\r
129 +# vim: set sw=2 sts=2 ts=2 et ft=zsh :\r
130 -- \r
131 1.6.5.2.433.g23cdb\r
132 \r