Unexpected results for bash autocompletion

Bug #103395 reported by David Fokkema
10
Affects Status Importance Assigned to Milestone
bash (Debian)
Fix Released
Unknown
bash-completion (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: bash

Open a terminal, then type this:

nice -19 ls De<TAB>

nothing happens. This might be due to the 'magic' scripts not working properly. Then type this:

time nice -19 ls De<TAB>

and you'll get: time nice -19 ls nice

which is really strange. Now type this:

time nice -19 rsync -av De<TAB><TAB>

and you'll get:

dfokkema@betelgeuse:~$ time nice -19 rsync -av rsync bash: COMP_WORDS: bad array subscript
bash: COMP_WORDS: bad array subscript
bash: COMP_WORDS: bad array subscript

I think this is really broken, ;-) My guess is that it has something to do with the minus signs. One for brokenness, two for really brokenness, ;-)

Matthias Klose (doko)
Changed in bash:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

The problem also occurs in edgy

Changed in bash:
status: Unknown → New
Revision history for this message
Christoph Bier (christoph-bier) wrote :

.. and in Gutsy.

Mika Fischer (zoop)
Changed in bash-completion:
assignee: nobody → zoop
status: Confirmed → In Progress
Revision history for this message
Mika Fischer (zoop) wrote :

I've prepared an updated package in my PPA which should fix the bug you reported.

If you're using hardy I'd appreciate it if you could test it and report whether your bug is indeed fixed and also whether you experienced any other regressions.

You can get the package from here:
http://launchpadlibrarian.net/13042048/bash-completion_20060301-3ubuntu2%7Eppa2_all.deb

To install it:
wget http://launchpadlibrarian.net/13042048/bash-completion_20060301-3ubuntu2%7Eppa2_all.deb
sudo dpkg -i bash-completion_20060301-3ubuntu2~ppa2_all.deb

To go back to the original package, do this:
sudo aptitude install bash-completion/hardy

If I don't get reports of regressions I'll try to get this version into the hardy.

Thanks for your help!

Changed in bash-completion:
status: In Progress → Fix Committed
Revision history for this message
Mika Fischer (zoop) wrote :

I've attached a debdiff fixing this and most of the other bugs against bash-completion.

I've been using these fixes for some time now without problems. You can also see the separate patches here: http://git.zoopnet.de/bash-completion.git

It would be great if someone could sponsor me to get this package into hardy.

Mika Fischer (zoop)
Changed in bash-completion:
assignee: zoop → nobody
status: Fix Committed → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Matthias: can you please take a look at it?

Revision history for this message
Mika Fischer (zoop) wrote :

New debdiff which fixes #211180 additionally.

Revision history for this message
Mika Fischer (zoop) wrote :

New debdiff which reverts the fix for #177243 because it caused a regression.

Revision history for this message
Mika Fischer (zoop) wrote :
Revision history for this message
Mika Fischer (zoop) wrote :

Anything I can do to get this into hardy before final freeze?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 20060301-3ubuntu2

---------------
bash-completion (20060301-3ubuntu2) hardy; urgency=low

  * Bugfix release:
   - Fix _get_cword more
   - Fix _command function to correctly prune the command line (LP: #103395)
   - Remove newline from options pattern for dpkg (LP: #138312)
   - Start readline-quoting arguments to compgen (LP: #123665)
   - Save and restore -v shell option (LP: #205444)
   - Prevent glob expansion in _filedir function (LP: #194419)
   - Quote glob expression in tar completion function (LP: #194419)
   - Complete AAS/SSA files for mplayer -sub (LP: #151086)
   - Disable completion of postgresql users and databases (LP: #164772)
   - Use files from UserKnownHostsFile options in addition to standard ones
     (LP: #211180)

 -- Mika Fischer <email address hidden> Sat, 05 Apr 2008 16:09:34 +0200

Changed in bash-completion:
status: Confirmed → Fix Released
Changed in bash:
status: New → Confirmed
Changed in bash:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.