First things first: Junio, please don't pick up this patch.

On Sun, Jun 09, 2013 at 05:09:54PM -0700, Jonathan Nieder wrote:
> SZEDER Gábor wrote:
> > Fedore 9 shipped the gvfs package with a buggy Bash completion script:
> > it removed the ':' character from COMP_WORDBREAKS, thereby breaking
> > certain features of git's completion script.  We worked this around in
> > db8a9ff0 (bash completion: Resolve git show ref:path<tab> losing ref:
> > portion, 2008-07-15).
> >
> > The bug was fixed in Fedora 10 and Fedora 9 reached its EOL on
> > 2009-07-10, almost four years ago.  It's about time to remove our
> > workaround.
> Nice!  I had wondered what that workaround was about but never
> ended up digging into it.

Meh, not nice at all.

> Searching for COMP_WORDBREAKS in /etc/bash_completion.d/* finds
> similar breakage (removal of '=' and '@') in the npm completion
> script, but nothing involving colon.  So this looks like a good
> change.

And apparently I have a completion script called axi-cache (from
package apt-xapian-index) which removes ':' [1].  However, it doesn't
remove the ':' upon loading the script but the removal is done in the
completion function, i.e. it takes effect only when the user actually
attempts to complete its options.  I never use axi-cache, whatever the
hell it might be, so I didn't notice.

Unfortunately, with my above patch applied I get this in a new shell:

$ git show master:q<TAB>
$ git show master:quote.<TAB>
master:quote.c   master:quote.h   

$ axi-cache <TAB>
again     depends   help      madison   more      policy    rdepends
search    show      showpkg   showsrc   

$ git show master:q<TAB>
$ git show quote.<TAB>
quote.c  quote.h  quote.o

Not good.

I don't have the npm package, but manually removing '=' from
COMP_WORDBREAKS leads to similar breakage with e.g. 'git log

Neither this axi-cache not npm completion script comes from the
bash-completion project.  Apparently some developers providing
completion scripts for their projects lack the necessary expertise to
consider the effects their script might have on other completion
scripts.  Perhaps distributions should adopt a policy not to allow
completion scripts messing with COMP_WORDBREAKS, dunno.

Anyway.  Although the completion script in Fedora's gvfs package might
be fixed, there are other completion scripts making the same mistake,
so I'm afraid we should keep the workaround and drop this patch.
Moreover, we should even consider extending our workaround by adding
back '=' to COMP_WORDBREAKS, too.  Oh, well.

[1] - This might not be accurate nowadays, as my system is a bit


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to