[Bug 1372286] Re: unwanted space after directory completion

Peter Cordes peter at cordes.ca
Sun Nov 30 03:48:08 UTC 2014


This doesn't happen on a normal Trusty system, but yeah, there are
similar reports of this happening to people.  Must be some kind of
leftover stuff from upgrades. My system has  an upgrade chain going back
to Edgy (6.10), but I keep it tidy with aptitude and other tools.

You may have some cruft in your /etc/bash_completion.d that's causing
problems.  Either from packages that were removed but not purged, or
from obsolete conffiles (that the package owning them no longer
supplies, but didn't remove during upgrade).

bug 1000470 looks like it was due to acroread's tab completion, which is
blacklisted in Trusty.  Does your bash_completion.d have a different
name for acroread's adobe-supplied tab completion, that sneaks past the
blacklist and breaks your programmable completion?


And check for obsolete conffile with:
dpkg-query -f '${Conffiles}\n' -W | grep 'obsolete$'  | grep completion

I cooked up this perl script to go through the list and check if they match the stored md5sum from the package that provided them.  And to print out the name of the package owning each one.
dpkg-query -f '${Package}\n${Conffiles}\n' -W | 
perl -ane 'chomp; $pkg=$_ and next if !/^ /; $F[2] eq "obsolete" or next; -e $F[0] or print "no $F[0]\n" and next; ($localmd5)=split / /, `md5sum ${F[0]}`; print "$F[0] ". ($localmd5 eq $F[1] ? "un":"") . "modified in $pkg\n"; system "ls -l $F[0]";'

dpkg-query is just a fancy way to grep /var/lib/dpkg/status, but don't
tell anyone, because it's Better to use the documented API (dpkg-query),
instead of digging in the file yourself.  The lines recording obsolete
conffiles are removed by dpkg when the package owning them is purged,
upgraded, or reinstalled.  (not just reconfigured).

also see http://raphaelhertzog.com/2011/01/31/debian-cleanup-tip-1-get-
rid-of-useless-configuration-files/ including one of the comments about
obsolete conffiles leftover after package upgrades.


** Changed in: bash-completion (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1372286

Title:
  unwanted space after directory completion

Status in bash-completion package in Ubuntu:
  Incomplete

Bug description:
  With bash-completion 2.1 the default for "unknown" commands seems to be to add a space after a string.
  Thus path name completion cannot be performed properly.
  Various users have complained about this for specific commands.

  The reason behind bash-completion is to make life easier.
  So the default should always be the more ergonomic solution.

  In most cases the added space requires a backspace, a '/' and another tab press.
  This is awkward and much worse than manually entering space when necessary.

  So please change the default for pathname completion back to the
  behaviour of bash_completion 1.3.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1372286/+subscriptions



More information about the foundations-bugs mailing list