Having upgraded my machine to Karmic, this bug got on my nerves. I
tracked it down, and it occurs because the '_get_cword' routine in
'/etc/bash_completion' is meant for bash-3, but Karmic uses bash-4.
Essentially, it takes the value 'host.domain.com:/tmp/' and splits it
into the three strings: 'host.domain.com', ':', and '/tmp/', when it
shouldn't be splitting it at all.

I looked through the code on Debian's bash-completion package that was
posted, and they have the '_get_cword' routine split into to two
different sub-routines, one for bash-3 and another for bash-4. It
branches depending on the value of a variable $bash4, although that
appears to be non-existent in Karmic. I hacked around this to look at
the actual return of 'bash --verison', and it should work reliably for
now. A true long-term solution would involve using a bash and bash-
completion package that are in sync.

Anyway, I attached a patch that fixes the issue specifically by the
means I outlined above. I've been using it for the past few hours now,
and I haven't come across any issues. In fact, it very well may fix
other bash completion issues since anything that isn't supposed to split
on a colon will exhibit incorrect behavior.  The only file it effects is
'/etc/bash_completion'.

Marc Andrysco

** Attachment added: "fixes colon issues on bash-completion"
   http://launchpadlibrarian.net/35293427/bash_completion.patch

-- 
regression for completing remote files/dirs over ssh
https://bugs.launchpad.net/bugs/449349
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to