git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Sverre Rabbelier <srabbelier@gmail.com>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
	"Git List" <git@vger.kernel.org>,
	"Shawn O. Pearce" <gsoc@spearce.org>,
	"SZEDER Gábor" <szeder@ira.uka.de>,
	"Stephen Boyd" <bebarino@gmail.com>
Subject: Re: [BUG] Autocompletion fails with "bash: words: bad array subscript"
Date: Tue, 10 May 2011 17:01:16 -0400	[thread overview]
Message-ID: <20110510210116.GA25224@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTi=0r_hCgt3wh4EkRqS6gnCyyKrY2g@mail.gmail.com>

On Tue, May 10, 2011 at 10:47:49PM +0200, Sverre Rabbelier wrote:

> On Tue, May 10, 2011 at 22:39, Jeff King <peff@peff.net> wrote:
> > Hrm. That code doesn't appear in our completion at all. We provide our
> > own _get_comp_words_by_ref, but if it is already defined, we use
> > whatever is there. So on my box, the problematic code comes from
> > /etc/bash_completion. And I think it is a bug there, as this is one of
> > the first things called (so git's completion hasn't had a change to
> > introduce any bugs yet :) ).
> 
> Most curious, since it doesn't happen when I don't source git
> completion. Perhaps it'll happen for any completion, or maybe we're
> using the completion wrong somehow? I'm on Debian wheezy/sid.

Right. Bash calls into our __git() completion function, which calls the
implementation of _get_comp_words_by_ref from /etc/bash_completion,
which has the bug. If you don't source git completion, then you are just
getting bash's default file completion.

-Peff

  reply	other threads:[~2011-05-10 21:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 20:13 [BUG] Autocompletion fails with "bash: words: bad array subscript" Sverre Rabbelier
2011-05-10 20:31 ` Jeff King
2011-05-10 20:39   ` Jeff King
2011-05-10 20:47     ` Sverre Rabbelier
2011-05-10 21:01       ` Jeff King [this message]
2011-05-10 21:02         ` Sverre Rabbelier
2011-05-10 21:10           ` Jeff King
2011-05-10 22:39             ` SZEDER Gábor
2011-05-10 23:45               ` Jonathan Nieder
2011-05-11 21:09                 ` SZEDER Gábor
2011-05-10 22:14 ` [PATCH] completion: fix array indexing error after reverse history search SZEDER Gábor
2011-05-10 22:19   ` Sverre Rabbelier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110510210116.GA25224@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=bebarino@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gsoc@spearce.org \
    --cc=jrnieder@gmail.com \
    --cc=srabbelier@gmail.com \
    --cc=szeder@ira.uka.de \
    /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.
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 NNTP newsgroup(s).