The current "stable" version of bash-completion does not do
command completion in many of the places where something else
prefixes the command, for example:
su johndoe -c sor<tab>
sh -c sor<tab>
bash -c sor<tab>
fakeroot sor<tab>
LC_ALL=C sor<tab>
etc. etc.
Expected result:
sor<tab> completes to sort in all 5 cases
Actual result:
Only the fakeroot sor<tab> case completes to fakeroot sort
sor<tab> does not complete to sort unless I happen to have a
file by that name in the current dir (or a user by that name for
su!).
(I know the LC_ALL=C variant has its own bug report with a claim
that this is somehow a bug in bash, but the others cannot be
attributed to that).
These used to work in the bash-completion that was part of the
bash package a few years back.
This bug is also present in oldstable (lenny).