Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 30 / a57a9de8c3348f57cae8d2ee5781283309171a
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 1AB22431FAE\r
6         for <notmuch@notmuchmail.org>; Mon, 18 Aug 2014 09:33:42 -0700 (PDT)\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 YYC2Oh4cBkat for <notmuch@notmuchmail.org>;\r
16         Mon, 18 Aug 2014 09:33:34 -0700 (PDT)\r
17 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com\r
18         [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 01BC7431FBC\r
21         for <notmuch@notmuchmail.org>; Mon, 18 Aug 2014 09:33:28 -0700 (PDT)\r
22 Received: by mail-wi0-f171.google.com with SMTP id hi2so4022748wib.10\r
23         for <notmuch@notmuchmail.org>; Mon, 18 Aug 2014 09:33:26 -0700 (PDT)\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=byi9LzKAig0HNDZfVDvvdvNxJNTbrzEPmDu+sJwRKJ4=;\r
28         b=RJG0t0426M3jMz/FR/Vhp6ik/+OrY3NXGOp5W/1zrLGoCqFYc8d3MY/1D+hUko3pG8\r
29         Vc6CZqzKd2pqj3Bc15lCjidvUdHDEpZpHfIb9mShtn3iYe4DKYJJr5Rcu3GDEc25LkAh\r
30         ae0aPZhKoHknyyKVGHBJrZMvkkU4trsR7bea9EcQil7+gC5IzThRxw8+2enTjmPbrGFk\r
31         vmmTBBcvtrrvJYKLUZV8blC/3QLWIxZJLR9G6i1L6/kGozcM8lb+IcR86Cq/Ey+p3Ha2\r
32         Z6Uf7QdnAYBVrQCKN10DdgvKnJjL+V2J/obCfDzKpJKZcGNrhA0nFjiF2K+kkZtiCGfh\r
33         tQog==\r
34 X-Gm-Message-State:\r
35  ALoCoQldgG2JOeSAqGLHEsQaBuTd/aAXcsvBfCLUb1LafyPL/v5CfBp2AZXQNHarn46+vVwn6ULC\r
36 X-Received: by 10.180.19.1 with SMTP id a1mr205174wie.16.1408379605676;\r
37         Mon, 18 Aug 2014 09:33:25 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw2-58c374-75.dhcp.inet.fi.\r
39         [88.195.116.75]) by mx.google.com with ESMTPSA id\r
40         do6sm39372967wib.22.2014.08.18.09.33.23 for <multiple recipients>\r
41         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
42         Mon, 18 Aug 2014 09:33:24 -0700 (PDT)\r
43 From: Jani Nikula <jani@nikula.org>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH] completion: fail silently if _init_completion is not found\r
46 Date: Mon, 18 Aug 2014 19:33:21 +0300\r
47 Message-Id: <1408379601-31994-1-git-send-email-jani@nikula.org>\r
48 X-Mailer: git-send-email 2.0.1\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: Mon, 18 Aug 2014 16:33:42 -0000\r
62 \r
63 The completion script depends on bash-completion 1.90 or later, with\r
64 _init_completion function. If that's not present, for some reason, the\r
65 completion currently fails with an ugly message, messing up user's\r
66 command line:\r
67 \r
68 $ notmuch -bash: _init_completion: command not found\r
69 \r
70 It's better to just not complete\r
71 \r
72 ---\r
73 \r
74 This is probably unnecessary since\r
75 \r
76 commit aff5af582ecbacb4004ad306c6ef463d61f1ed3a\r
77 Author: Jani Nikula <jani@nikula.org>\r
78 Date:   Sun Feb 2 18:47:57 2014 +0200\r
79 \r
80     configure: only install bash completion if supported\r
81 \r
82 but should not do harm.\r
83 ---\r
84  completion/notmuch-completion.bash | 4 ++++\r
85  1 file changed, 4 insertions(+)\r
86 \r
87 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash\r
88 index d88c5e7d965e..0571dc9da8e3 100644\r
89 --- a/completion/notmuch-completion.bash\r
90 +++ b/completion/notmuch-completion.bash\r
91 @@ -395,6 +395,10 @@ _notmuch()\r
92  {\r
93      local _notmuch_commands="compact config count dump help insert new reply restore search setup show tag"\r
94      local arg cur prev words cword split\r
95 +\r
96 +    # require bash-completion with _init_completion\r
97 +    type -t _init_completion >/dev/null 2>&1 || return\r
98 +\r
99      _init_completion || return\r
100  \r
101      COMPREPLY=()\r
102 -- \r
103 2.0.1\r
104 \r