git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter van der Does <peter@avirtualhome.com>
To: git@vger.kernel.org
Subject: Re: bash completion broken on ubuntu 10.10?
Date: Wed, 20 Oct 2010 22:50:18 -0400	[thread overview]
Message-ID: <20101020225018.46f7e70e@montecarlo.grandprix.int> (raw)
In-Reply-To: <20101020230409.GB1767@neumann>

On Thu, 21 Oct 2010 01:04:09 +0200
SZEDER Gábor <szeder@ira.uka.de> wrote:

> Hi,
> 
> Git's bash completion script offers possible arguments to some
> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
> --reuse-message=<TAB>', etc.
> 
> On a three day old ubuntu 10.10 install these don't work anymore; the
> completion script offers the list of files in all those cases.
> 
> After a bit of investigation I found that when I press TAB after 'git
> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'
> and ${COMP_WORDS[COMP_CWORD]} contains "=".  Weird.
> 
> Then I remembered that we had some COMP_WORDBREAKS issues in the past
> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:
> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't
> see anything suspicious (it contains "'><=;|&(: ).  Removing the '='
> makes the listing after 'git log --pretty=' work, but breaks many
> other things badly.
> 
> I don't have any ideas what could possibly be wrong here (but it's too
> late here for any bright ideas anyway...).  Could someone confirm or
> deny this behaviour on ubuntu 10.10?
> 
> 
> Thanks,
> Gábor
> 

My guess is that it has to do with Bash 4, the equal sign must be seen
as a new word. I'm running Ubuntu 10.04 and have the same problem.
I fixed the problem locally, I just don't know if that works on Bash 3
and I doubt it will work on Bash 3.

I changed the script only for git log, not other commands yet, like 
git am --whitespace=<tab><tab>


-- 
Peter van der Does

GPG key: E77E8E98

IRC: Ganseki on irc.freenode.net
Twitter: @petervanderdoes

WordPress Plugin Developer
Blog: http://blog.avirtualhome.com
Forums: http://forums.avirtualhome.com
Twitter: @avhsoftware

  parent reply	other threads:[~2010-10-21  3:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 23:04 bash completion broken on ubuntu 10.10? SZEDER Gábor
2010-10-20 23:33 ` Brian Gernhardt
2010-10-21  2:50 ` Peter van der Does [this message]
2010-10-21  4:44   ` Kevin Ballard
2010-10-21 10:35   ` Mathias Lafeldt

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=20101020225018.46f7e70e@montecarlo.grandprix.int \
    --to=peter@avirtualhome.com \
    --cc=git@vger.kernel.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.
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).