1 Return-Path: <tomi.ollila@iki.fi>
\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 19C2B431FBD
\r
6 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 05:30:23 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 mxKTJLGo4FJi for <notmuch@notmuchmail.org>;
\r
16 Thu, 7 Nov 2013 05:30:15 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 44171431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 05:30:15 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id C095D100051;
\r
22 Thu, 7 Nov 2013 15:30:10 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] completion: update bash completion
\r
26 In-Reply-To: <1383765937-20921-1-git-send-email-jani@nikula.org>
\r
27 References: <1383765937-20921-1-git-send-email-jani@nikula.org>
\r
28 User-Agent: Notmuch/0.16+119~g219c55f (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Thu, 07 Nov 2013 15:30:10 +0200
\r
34 Message-ID: <m24n7o9w65.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Thu, 07 Nov 2013 13:30:23 -0000
\r
51 On Wed, Nov 06 2013, Jani Nikula <jani@nikula.org> wrote:
\r
53 > Update bash completion to cover new commands and options:
\r
55 > notmuch compact --quiet --backup=DIR
\r
56 > notmuch count --output=files --batch --input=FILE
\r
57 > notmuch insert --folder=DIR --create-folder
\r
58 > notmuch search --exclude=all --duplicate=N
\r
59 > notmuch show --include-html
\r
60 > notmuch tag --batch --input=FILE --remove-all
\r
62 These changes looks sensible and consistent to me. +1
\r
70 > This logically depends on id:cover.1383481295.git.jani@nikula.org
\r
71 > which adds --quiet and --backup=DIR parameters to compact.
\r
73 > completion/notmuch-completion.bash | 89 +++++++++++++++++++++++++++++++++++---
\r
74 > 1 file changed, 82 insertions(+), 7 deletions(-)
\r
76 > diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
\r
77 > index 7bd7745..04324bb 100644
\r
78 > --- a/completion/notmuch-completion.bash
\r
79 > +++ b/completion/notmuch-completion.bash
\r
80 > @@ -59,6 +59,29 @@ _notmuch_search_terms()
\r
81 > __ltrim_colon_completions "${cur}"
\r
84 > +_notmuch_compact()
\r
86 > + local cur prev words cword split
\r
87 > + _init_completion -s || return
\r
90 > + case "${prev}" in
\r
98 > + case "${cur}" in
\r
100 > + local options="--backup= --quiet"
\r
101 > + compopt -o nospace
\r
102 > + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
107 > _notmuch_config()
\r
109 > local cur prev words cword split
\r
110 > @@ -89,19 +112,23 @@ _notmuch_count()
\r
112 > case "${prev}" in
\r
114 > - COMPREPLY=( $( compgen -W "messages threads" -- "${cur}" ) )
\r
115 > + COMPREPLY=( $( compgen -W "messages threads files" -- "${cur}" ) )
\r
119 > COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) )
\r
131 > - local options="--output= --exclude="
\r
132 > + local options="--output= --exclude= --batch --input="
\r
133 > compopt -o nospace
\r
134 > COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
136 > @@ -141,6 +168,39 @@ _notmuch_dump()
\r
140 > +_notmuch_insert()
\r
142 > + local cur prev words cword split
\r
143 > + # handle tags with colons and equal signs
\r
144 > + _init_completion -s -n := || return
\r
147 > + case "${prev}" in
\r
155 > + case "${cur}" in
\r
157 > + local options="--create-folder --folder="
\r
158 > + compopt -o nospace
\r
159 > + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
163 > + COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )
\r
166 > + COMPREPLY=( $(compgen -P "-" -W "`notmuch search --output=tags \*`" -- ${cur##-}) )
\r
169 > + # handle tags with colons
\r
170 > + __ltrim_colon_completions "${cur}"
\r
175 > local cur prev words cword split
\r
176 > @@ -231,7 +291,7 @@ _notmuch_search()
\r
180 > - COMPREPLY=( $( compgen -W "true false flag" -- "${cur}" ) )
\r
181 > + COMPREPLY=( $( compgen -W "true false flag all" -- "${cur}" ) )
\r
185 > @@ -239,7 +299,7 @@ _notmuch_search()
\r
189 > - local options="--format= --output= --sort= --offset= --limit= --exclude="
\r
190 > + local options="--format= --output= --sort= --offset= --limit= --exclude= --duplicate="
\r
191 > compopt -o nospace
\r
192 > COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
194 > @@ -273,7 +333,7 @@ _notmuch_show()
\r
198 > - local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt"
\r
199 > + local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt --include-html"
\r
200 > compopt -o nospace
\r
201 > COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
203 > @@ -287,9 +347,24 @@ _notmuch_tag()
\r
205 > local cur prev words cword split
\r
206 > # handle tags with colons and equal signs
\r
207 > - _init_completion -n := || return
\r
208 > + _init_completion -s -n := || return
\r
211 > + case "${prev}" in
\r
221 > + local options="--batch --input= --remove-all"
\r
222 > + compopt -o nospace
\r
223 > + COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
\r
227 > COMPREPLY=( $(compgen -P "+" -W "`notmuch search --output=tags \*`" -- ${cur##+}) )
\r
229 > @@ -307,7 +382,7 @@ _notmuch_tag()
\r
233 > - local _notmuch_commands="config count dump help new reply restore search setup show tag"
\r
234 > + local _notmuch_commands="compact config count dump help insert new reply restore search setup show tag"
\r
235 > local arg cur prev words cword split
\r
236 > _init_completion || return
\r
241 > _______________________________________________
\r
242 > notmuch mailing list
\r
243 > notmuch@notmuchmail.org
\r
244 > http://notmuchmail.org/mailman/listinfo/notmuch
\r