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 12334431FD5
\r
6 for <notmuch@notmuchmail.org>; Sun, 2 Feb 2014 04:54:41 -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 yGayWRUC9KuZ for <notmuch@notmuchmail.org>;
\r
16 Sun, 2 Feb 2014 04:54:33 -0800 (PST)
\r
17 Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com
\r
18 [74.125.83.44]) (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 7B450431FC0 for <notmuch@notmuchmail.org>; Sun, 2 Feb 2014 04:54:33 -0800
\r
22 Received: by mail-ee0-f44.google.com with SMTP id c13so3121010eek.31
\r
23 for <notmuch@notmuchmail.org>; Sun, 02 Feb 2014 04:54:32 -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:subject:in-reply-to:references
\r
27 :user-agent:date:message-id:mime-version:content-type;
\r
28 bh=YgIKRx1dAsYrAKu01z26Oqe8eBwDDFj1X3+N28JEkMk=;
\r
29 b=Hes9mNZ3xdepqyjtiuiyku19HsPjgVq/4n/N7zYv68/7kfzBBbaBRhQaAe7jbb2/qi
\r
30 Lovted/72ROc+jHWUlGCBAzO+C5USmmRgRUjqSvdQjfkQN5Ko8Hum8PSziAkG/SyUyon
\r
31 XQ1wtrAAwzVArRSau7HKhqhYFM4kJotMGASshGjGDOrHYJWJExpN3eAD6F3tq/V7jAU4
\r
32 tqbC/2ln65DXENUCegkhfXIC2KxxRfH5hGkHYfmAyR/cqMkobadOECgUXeJ0YOnwjzQz
\r
33 RV48Y6lJ57HJS4m/qBXtd2Eqy3D8k2HbsuubmqEqSjCR924KuJICKfdWY9wwdOdVfpTR
\r
36 ALoCoQl4V8nvL/wNj8fx3HrXeIvR2QDJSsvKy8DETftHIgJe6CIHIyCwyGR0b24W1TKFlhWsLVqy
\r
37 X-Received: by 10.15.36.196 with SMTP id i44mr228166eev.104.1391345672391;
\r
38 Sun, 02 Feb 2014 04:54:32 -0800 (PST)
\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
41 by mx.google.com with ESMTPSA id 46sm61567973ees.4.2014.02.02.04.54.30
\r
42 for <multiple recipients>
\r
43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
44 Sun, 02 Feb 2014 04:54:31 -0800 (PST)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: Anand Buddhdev <arhbkb@gmail.com>, notmuch@notmuchmail.org
\r
47 Subject: Re: bash completion error with 0.17
\r
48 In-Reply-To: <87a9e9yeta.fsf@nikula.org>
\r
50 <CANbPJF=vD8VAhGKT_3udssvApbD_W644j=4o2H8h11xZjqPphA@mail.gmail.com>
\r
51 <87a9e9yeta.fsf@nikula.org>
\r
52 User-Agent: Notmuch/0.17+44~ge3b4cd9 (http://notmuchmail.org) Emacs/24.3.1
\r
53 (x86_64-pc-linux-gnu)
\r
54 Date: Sun, 02 Feb 2014 14:54:29 +0200
\r
55 Message-ID: <874n4hy8sa.fsf@nikula.org>
\r
57 Content-Type: text/plain
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Sun, 02 Feb 2014 12:54:41 -0000
\r
72 On Sun, 02 Feb 2014, Jani Nikula <jani@nikula.org> wrote:
\r
73 > The trivial "fix" patch would likely just check for the existence of
\r
74 > _init_completion, and refuse to complete without it. For anything
\r
75 > fancier, patches welcome...
\r
77 The patch below would get rid of the error message (and completion, for
\r
78 that matter) when _init_completion is not present.
\r
80 I'm not sure whether this is the way to go, or should we rather check
\r
81 for a recent enough bash-completion during configure, or
\r
82 recommend/suggest it, or what. The error message does tell us what's
\r
83 wrong, although it's annoying for the user (probably more so than just
\r
91 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
\r
92 index 0f13204..0c457a8 100644
\r
93 --- a/completion/notmuch-completion.bash
\r
94 +++ b/completion/notmuch-completion.bash
\r
95 @@ -384,6 +384,10 @@ _notmuch()
\r
97 local _notmuch_commands="compact config count dump help insert new reply restore search setup show tag"
\r
98 local arg cur prev words cword split
\r
100 + # require bash-completion with _init_completion
\r
101 + type -t _init_completion >/dev/null 2>&1 || return
\r
103 _init_completion || return
\r