[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / ae / be209849ad827231f137fdc2886529447c3ef1
1 Return-Path: <jani@nikula.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 155CB429E5D\r
6         for <notmuch@notmuchmail.org>; Wed,  6 Nov 2013 11:25:51 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id gCHgtYEtBnue for <notmuch@notmuchmail.org>;\r
16         Wed,  6 Nov 2013 11:25:43 -0800 (PST)\r
17 Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com\r
18  [74.125.83.54])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  065B9429E53    for <notmuch@notmuchmail.org>; Wed,  6 Nov 2013 11:25:42 -0800\r
21  (PST)\r
22 Received: by mail-ee0-f54.google.com with SMTP id c50so2814647eek.27\r
23         for <notmuch@notmuchmail.org>; Wed, 06 Nov 2013 11:25:40 -0800 (PST)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
27         bh=7yytpoFUW5268d4CkCKPbbHnxEdNqpqBym4GWu4zmJ4=;\r
28         b=BloeKAJlea/HavyLcZpoL51PqvpGin6gKC0LM01jmXvW4l78cCXYipShKtf8HPyExY\r
29         u2/XUov5iRkVJoGcYpif3cUawdsDi0TRsefVBL2wBPVWm6OjukRPC3uP3L3ATXDOWDpF\r
30         9PWdNZyR8hVma81fjOKaFw2UJ+ksG/dVY+jG/+Kp2jkGiBIkQDOao0Ixo92Xs/L2x3pB\r
31         +7bCxeTYC/dOh1+ngC1S47yIbRSklixfBEhsyIYM9M2cxisf8U1y45h5srG5g7A1Gfyj\r
32         BT8pgI5IRC+KQWcMdIQYHrP6j3jJdm+MuO+hideu6poUwrQ+trW70cxJSXkyfdkl0h2S\r
33         igCQ==\r
34 X-Gm-Message-State:\r
35  ALoCoQkibZRMv3CT2VfJRn5n4Ky14u4et7928p9PUlUe59PNjnRpje+4AobQ8v0jjNEQ0kWEl4up\r
36 X-Received: by 10.14.178.67 with SMTP id e43mr5496082eem.59.1383765940374;\r
37         Wed, 06 Nov 2013 11:25:40 -0800 (PST)\r
38 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
39         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
40         u46sm77813724eep.17.2013.11.06.11.25.38 for <multiple recipients>\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Wed, 06 Nov 2013 11:25:39 -0800 (PST)\r
43 From: Jani Nikula <jani@nikula.org>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH] completion: update bash completion\r
46 Date: Wed,  6 Nov 2013 21:25:37 +0200\r
47 Message-Id: <1383765937-20921-1-git-send-email-jani@nikula.org>\r
48 X-Mailer: git-send-email 1.8.4.rc3\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Wed, 06 Nov 2013 19:25:51 -0000\r
62 \r
63 Update bash completion to cover new commands and options:\r
64 \r
65 notmuch compact --quiet --backup=DIR\r
66 notmuch count --output=files --batch --input=FILE\r
67 notmuch insert --folder=DIR --create-folder\r
68 notmuch search --exclude=all --duplicate=N\r
69 notmuch show --include-html\r
70 notmuch tag --batch --input=FILE --remove-all\r
71 \r
72 ---\r
73 \r
74 This logically depends on id:cover.1383481295.git.jani@nikula.org\r
75 which adds --quiet and --backup=DIR parameters to compact.\r
76 ---\r
77  completion/notmuch-completion.bash | 89 +++++++++++++++++++++++++++++++++++---\r
78  1 file changed, 82 insertions(+), 7 deletions(-)\r
79 \r
80 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash\r
81 index 7bd7745..04324bb 100644\r
82 --- a/completion/notmuch-completion.bash\r
83 +++ b/completion/notmuch-completion.bash\r
84 @@ -59,6 +59,29 @@ _notmuch_search_terms()\r
85      __ltrim_colon_completions "${cur}"\r
86  }\r
87  \r
88 +_notmuch_compact()\r
89 +{\r
90 +    local cur prev words cword split\r
91 +    _init_completion -s || return\r
92 +\r
93 +    $split &&\r
94 +    case "${prev}" in\r
95 +       --backup)\r
96 +           _filedir\r
97 +           return\r
98 +           ;;\r
99 +    esac\r
100 +\r
101 +    ! $split &&\r
102 +    case "${cur}" in\r
103 +       -*)\r
104 +           local options="--backup= --quiet"\r
105 +           compopt -o nospace\r
106 +           COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
107 +           ;;\r
108 +    esac\r
109 +}\r
110 +\r
111  _notmuch_config()\r
112  {\r
113      local cur prev words cword split\r
114 @@ -89,19 +112,23 @@ _notmuch_count()\r
115      $split &&\r
116      case "${prev}" in\r
117         --output)\r
118 -           COMPREPLY=( $( compgen -W "messages threads" -- "${cur}" ) )\r
119 +           COMPREPLY=( $( compgen -W "messages threads files" -- "${cur}" ) )\r
120             return\r
121             ;;\r
122         --exclude)\r
123             COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) )\r
124             return\r
125             ;;\r
126 +       --input)\r
127 +           _filedir\r
128 +           return\r
129 +           ;;\r
130      esac\r
131  \r
132      ! $split &&\r
133      case "${cur}" in\r
134         -*)\r
135 -           local options="--output= --exclude="\r
136 +           local options="--output= --exclude= --batch --input="\r
137             compopt -o nospace\r
138             COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
139             ;;\r
140 @@ -141,6 +168,39 @@ _notmuch_dump()\r
141      esac\r
142  }\r
143  \r
144 +_notmuch_insert()\r
145 +{\r
146 +    local cur prev words cword split\r
147 +    # handle tags with colons and equal signs\r
148 +    _init_completion -s -n := || return\r
149 +\r
150 +    $split &&\r
151 +    case "${prev}" in\r
152 +       --folder)\r
153 +           _filedir\r
154 +           return\r
155 +           ;;\r
156 +    esac\r
157 +\r
158 +    ! $split &&\r
159 +    case "${cur}" in\r
160 +       --*)\r
161 +           local options="--create-folder --folder="\r
162 +           compopt -o nospace\r
163 +           COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
164 +           return\r
165 +           ;;\r
166 +       +*)\r
167 +           COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )\r
168 +           ;;\r
169 +       -*)\r
170 +           COMPREPLY=( $(compgen -P "-" -W "`notmuch search --output=tags \*`" -- ${cur##-}) )\r
171 +           ;;\r
172 +    esac\r
173 +    # handle tags with colons\r
174 +    __ltrim_colon_completions "${cur}"\r
175 +}\r
176 +\r
177  _notmuch_new()\r
178  {\r
179      local cur prev words cword split\r
180 @@ -231,7 +291,7 @@ _notmuch_search()\r
181             return\r
182             ;;\r
183         --exclude)\r
184 -           COMPREPLY=( $( compgen -W "true false flag" -- "${cur}" ) )\r
185 +           COMPREPLY=( $( compgen -W "true false flag all" -- "${cur}" ) )\r
186             return\r
187             ;;\r
188      esac\r
189 @@ -239,7 +299,7 @@ _notmuch_search()\r
190      ! $split &&\r
191      case "${cur}" in\r
192         -*)\r
193 -           local options="--format= --output= --sort= --offset= --limit= --exclude="\r
194 +           local options="--format= --output= --sort= --offset= --limit= --exclude= --duplicate="\r
195             compopt -o nospace\r
196             COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
197             ;;\r
198 @@ -273,7 +333,7 @@ _notmuch_show()\r
199      ! $split &&\r
200      case "${cur}" in\r
201         -*)\r
202 -           local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt"\r
203 +           local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt --include-html"\r
204             compopt -o nospace\r
205             COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
206             ;;\r
207 @@ -287,9 +347,24 @@ _notmuch_tag()\r
208  {\r
209      local cur prev words cword split\r
210      # handle tags with colons and equal signs\r
211 -    _init_completion -n := || return\r
212 +    _init_completion -s -n := || return\r
213 +\r
214 +    $split &&\r
215 +    case "${prev}" in\r
216 +       --input)\r
217 +           _filedir\r
218 +           return\r
219 +           ;;\r
220 +    esac\r
221  \r
222 +    ! $split &&\r
223      case "${cur}" in\r
224 +       --*)\r
225 +           local options="--batch --input= --remove-all"\r
226 +           compopt -o nospace\r
227 +           COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
228 +           return\r
229 +           ;;\r
230         +*)\r
231             COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )\r
232             ;;\r
233 @@ -307,7 +382,7 @@ _notmuch_tag()\r
234  \r
235  _notmuch()\r
236  {\r
237 -    local _notmuch_commands="config count dump help new reply restore search setup show tag"\r
238 +    local _notmuch_commands="compact config count dump help insert new reply restore search setup show tag"\r
239      local arg cur prev words cword split\r
240      _init_completion || return\r
241  \r
242 -- \r
243 1.8.4.rc3\r
244 \r