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
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
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
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
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
63 Update bash completion to cover new commands and options:
\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
74 This logically depends on id:cover.1383481295.git.jani@nikula.org
\r
75 which adds --quiet and --backup=DIR parameters to compact.
\r
77 completion/notmuch-completion.bash | 89 +++++++++++++++++++++++++++++++++++---
\r
78 1 file changed, 82 insertions(+), 7 deletions(-)
\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
90 + local cur prev words cword split
\r
91 + _init_completion -s || return
\r
104 + local options="--backup= --quiet"
\r
105 + compopt -o nospace
\r
106 + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
113 local cur prev words cword split
\r
114 @@ -89,19 +112,23 @@ _notmuch_count()
\r
118 - COMPREPLY=( $( compgen -W "messages threads" -- "${cur}" ) )
\r
119 + COMPREPLY=( $( compgen -W "messages threads files" -- "${cur}" ) )
\r
123 COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) )
\r
135 - local options="--output= --exclude="
\r
136 + local options="--output= --exclude= --batch --input="
\r
138 COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
140 @@ -141,6 +168,39 @@ _notmuch_dump()
\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
151 + case "${prev}" in
\r
161 + local options="--create-folder --folder="
\r
162 + compopt -o nospace
\r
163 + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
167 + COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )
\r
170 + COMPREPLY=( $(compgen -P "-" -W "`notmuch search --output=tags \*`" -- ${cur##-}) )
\r
173 + # handle tags with colons
\r
174 + __ltrim_colon_completions "${cur}"
\r
179 local cur prev words cword split
\r
180 @@ -231,7 +291,7 @@ _notmuch_search()
\r
184 - COMPREPLY=( $( compgen -W "true false flag" -- "${cur}" ) )
\r
185 + COMPREPLY=( $( compgen -W "true false flag all" -- "${cur}" ) )
\r
189 @@ -239,7 +299,7 @@ _notmuch_search()
\r
193 - local options="--format= --output= --sort= --offset= --limit= --exclude="
\r
194 + local options="--format= --output= --sort= --offset= --limit= --exclude= --duplicate="
\r
196 COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
198 @@ -273,7 +333,7 @@ _notmuch_show()
\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
205 COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
207 @@ -287,9 +347,24 @@ _notmuch_tag()
\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
215 + case "${prev}" in
\r
225 + local options="--batch --input= --remove-all"
\r
226 + compopt -o nospace
\r
227 + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
231 COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )
\r
233 @@ -307,7 +382,7 @@ _notmuch_tag()
\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