From: Anand Buddhdev <arhbkb@gmail.com>
To: Jani Nikula <jani@nikula.org>
Cc: notmuch@notmuchmail.org
Subject: Re: bash completion error with 0.17
Date: Sun, 2 Feb 2014 15:33:26 +0100 [thread overview]
Message-ID: <CANbPJF=3+KpND6Fmhwuwer4hPBC6SKHM3C_dXr3xRzg8svk0uQ@mail.gmail.com> (raw)
In-Reply-To: <874n4hy8sa.fsf@nikula.org>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
Thanks Jani. I've just looked at the bash-completion formula on Homebrew.
It says that bash-completion 2.0 and above needs bash4, but the current
version of OSX, 10.9, still has bash 3.2, which is why, at least under
Homebrew, we can't update bash-completion to the latest version.
I think your patch probably makes sense. Once a user updates to a newer
bash-completion, it will just begin working, while for users like me, the
error message goes away.
On 2 February 2014 13:54, Jani Nikula <jani@nikula.org> wrote:
> On Sun, 02 Feb 2014, Jani Nikula <jani@nikula.org> wrote:
> > The trivial "fix" patch would likely just check for the existence of
> > _init_completion, and refuse to complete without it. For anything
> > fancier, patches welcome...
>
> The patch below would get rid of the error message (and completion, for
> that matter) when _init_completion is not present.
>
> I'm not sure whether this is the way to go, or should we rather check
> for a recent enough bash-completion during configure, or
> recommend/suggest it, or what. The error message does tell us what's
> wrong, although it's annoying for the user (probably more so than just
> not completing).
>
> BR,
> Jani.
>
>
>
> diff --git a/completion/notmuch-completion.bash
> b/completion/notmuch-completion.bash
> index 0f13204..0c457a8 100644
> --- a/completion/notmuch-completion.bash
> +++ b/completion/notmuch-completion.bash
> @@ -384,6 +384,10 @@ _notmuch()
> {
> local _notmuch_commands="compact config count dump help insert new
> reply restore search setup show tag"
> local arg cur prev words cword split
> +
> + # require bash-completion with _init_completion
> + type -t _init_completion >/dev/null 2>&1 || return
> +
> _init_completion || return
>
> COMPREPLY=()
>
[-- Attachment #2: Type: text/html, Size: 2334 bytes --]
prev parent reply other threads:[~2014-02-02 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 10:35 bash completion error with 0.17 Anand Buddhdev
2014-02-02 10:44 ` Jani Nikula
2014-02-02 10:46 ` Anand Buddhdev
2014-02-02 11:52 ` Jani Nikula
2014-02-02 12:54 ` Jani Nikula
2014-02-02 14:33 ` Anand Buddhdev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANbPJF=3+KpND6Fmhwuwer4hPBC6SKHM3C_dXr3xRzg8svk0uQ@mail.gmail.com' \
--to=arhbkb@gmail.com \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).