1 Return-Path: <arhbkb@gmail.com>
\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 B7685431FD5
\r
6 for <notmuch@notmuchmail.org>; Sun, 2 Feb 2014 06:33:37 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.798 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id oX7rX7zthedG for <notmuch@notmuchmail.org>;
\r
18 Sun, 2 Feb 2014 06:33:29 -0800 (PST)
\r
19 Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com
\r
20 [74.125.82.52]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 984BA431FC0 for <notmuch@notmuchmail.org>; Sun, 2 Feb 2014 06:33:29 -0800
\r
24 Received: by mail-wg0-f52.google.com with SMTP id b13so11025958wgh.7
\r
25 for <notmuch@notmuchmail.org>; Sun, 02 Feb 2014 06:33:27 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
\r
29 bh=MHErlIMsbHzoCUYuYb3QgDYBngTI73wZEWYWgT94zfA=;
\r
30 b=tPdHAqAl2d3mzrtxIN6WvBSx1cSJwF8Ub+ADIuaSe7kc4GEmgFzFgQfZX39Iqc8gQa
\r
31 E+CgD+PeiQGB+X0VsP4czWmTPprL84+VkQ8XHarUGv0204JPpXlH2sP2YF3fyfJU0auK
\r
32 o07azybZuCiqjSrf6UI+wGDIzgrCT4FEjRhHmdJainKB6lpRVUqSfOs7zFOYVbIWVnXC
\r
33 p6jXNET9hQSn+zKOi+0cjACIcTVru/h/fh5rcMXYJkZwqUuTAum2E+fwUI0ArG495+c6
\r
34 DCvHTIw34wD/n1xU/nFM5UDSzj0nN2riCLzqoE03rQF7wlv8pH1VdGCU1GHk1OLqtefF
\r
37 X-Received: by 10.180.80.103 with SMTP id q7mr5691560wix.14.1391351606915;
\r
38 Sun, 02 Feb 2014 06:33:26 -0800 (PST)
\r
39 Received: by 10.227.2.9 with HTTP; Sun, 2 Feb 2014 06:33:26 -0800 (PST)
\r
40 In-Reply-To: <874n4hy8sa.fsf@nikula.org>
\r
42 <CANbPJF=vD8VAhGKT_3udssvApbD_W644j=4o2H8h11xZjqPphA@mail.gmail.com>
\r
43 <87a9e9yeta.fsf@nikula.org> <874n4hy8sa.fsf@nikula.org>
\r
44 Date: Sun, 2 Feb 2014 15:33:26 +0100
\r
46 <CANbPJF=3+KpND6Fmhwuwer4hPBC6SKHM3C_dXr3xRzg8svk0uQ@mail.gmail.com>
\r
47 Subject: Re: bash completion error with 0.17
\r
48 From: Anand Buddhdev <arhbkb@gmail.com>
\r
49 To: Jani Nikula <jani@nikula.org>
\r
50 Content-Type: multipart/alternative; boundary=f46d0442834c49b9a104f16d4afd
\r
51 Cc: notmuch@notmuchmail.org
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Sun, 02 Feb 2014 14:33:37 -0000
\r
66 --f46d0442834c49b9a104f16d4afd
\r
67 Content-Type: text/plain; charset=ISO-8859-1
\r
69 Thanks Jani. I've just looked at the bash-completion formula on Homebrew.
\r
70 It says that bash-completion 2.0 and above needs bash4, but the current
\r
71 version of OSX, 10.9, still has bash 3.2, which is why, at least under
\r
72 Homebrew, we can't update bash-completion to the latest version.
\r
74 I think your patch probably makes sense. Once a user updates to a newer
\r
75 bash-completion, it will just begin working, while for users like me, the
\r
76 error message goes away.
\r
79 On 2 February 2014 13:54, Jani Nikula <jani@nikula.org> wrote:
\r
81 > On Sun, 02 Feb 2014, Jani Nikula <jani@nikula.org> wrote:
\r
82 > > The trivial "fix" patch would likely just check for the existence of
\r
83 > > _init_completion, and refuse to complete without it. For anything
\r
84 > > fancier, patches welcome...
\r
86 > The patch below would get rid of the error message (and completion, for
\r
87 > that matter) when _init_completion is not present.
\r
89 > I'm not sure whether this is the way to go, or should we rather check
\r
90 > for a recent enough bash-completion during configure, or
\r
91 > recommend/suggest it, or what. The error message does tell us what's
\r
92 > wrong, although it's annoying for the user (probably more so than just
\r
100 > diff --git a/completion/notmuch-completion.bash
\r
101 > b/completion/notmuch-completion.bash
\r
102 > index 0f13204..0c457a8 100644
\r
103 > --- a/completion/notmuch-completion.bash
\r
104 > +++ b/completion/notmuch-completion.bash
\r
105 > @@ -384,6 +384,10 @@ _notmuch()
\r
107 > local _notmuch_commands="compact config count dump help insert new
\r
108 > reply restore search setup show tag"
\r
109 > local arg cur prev words cword split
\r
111 > + # require bash-completion with _init_completion
\r
112 > + type -t _init_completion >/dev/null 2>&1 || return
\r
114 > _init_completion || return
\r
119 --f46d0442834c49b9a104f16d4afd
\r
120 Content-Type: text/html; charset=ISO-8859-1
\r
121 Content-Transfer-Encoding: quoted-printable
\r
123 <div dir=3D"ltr">Thanks Jani. I've just looked at the bash-completion f=
\r
124 ormula on Homebrew. It says that bash-completion 2.0 and above needs bash4,=
\r
125 but the current version of OSX, 10.9, still has bash 3.2, which is why, at=
\r
126 least under Homebrew, we can't update bash-completion to the latest ve=
\r
128 <br></div><div>I think your patch probably makes sense. Once a user updates=
\r
129 to a newer bash-completion, it will just begin working, while for users li=
\r
130 ke me, the error message goes away.</div></div><div class=3D"gmail_extra">
\r
131 <br><br><div class=3D"gmail_quote">On 2 February 2014 13:54, Jani Nikula <s=
\r
132 pan dir=3D"ltr"><<a href=3D"mailto:jani@nikula.org" target=3D"_blank">ja=
\r
133 ni@nikula.org</a>></span> wrote:<br><blockquote class=3D"gmail_quote" st=
\r
134 yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
\r
135 <div class=3D"im">On Sun, 02 Feb 2014, Jani Nikula <<a href=3D"mailto:ja=
\r
136 ni@nikula.org">jani@nikula.org</a>> wrote:<br>
\r
137 > The trivial "fix" patch would likely just check for the exis=
\r
139 > _init_completion, and refuse to complete without it. For anything<br>
\r
140 > fancier, patches welcome...<br>
\r
142 </div>The patch below would get rid of the error message (and completion, f=
\r
144 that matter) when _init_completion is not present.<br>
\r
146 I'm not sure whether this is the way to go, or should we rather check<b=
\r
148 for a recent enough bash-completion during configure, or<br>
\r
149 recommend/suggest it, or what. The error message does tell us what's<br=
\r
151 wrong, although it's annoying for the user (probably more so than just<=
\r
153 not completing).<br>
\r
160 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-comple=
\r
162 index 0f13204..0c457a8 100644<br>
\r
163 --- a/completion/notmuch-completion.bash<br>
\r
164 +++ b/completion/notmuch-completion.bash<br>
\r
165 @@ -384,6 +384,10 @@ _notmuch()<br>
\r
167 =A0 =A0 =A0local _notmuch_commands=3D"compact config count dump help i=
\r
168 nsert new reply restore search setup show tag"<br>
\r
169 =A0 =A0 =A0local arg cur prev words cword split<br>
\r
171 + =A0 =A0# require bash-completion with _init_completion<br>
\r
172 + =A0 =A0type -t _init_completion >/dev/null 2>&1 || return<br>
\r
174 =A0 =A0 =A0_init_completion || return<br>
\r
176 =A0 =A0 =A0COMPREPLY=3D()<br>
\r
177 </blockquote></div><br></div>
\r
179 --f46d0442834c49b9a104f16d4afd--
\r