It's a corner case of a directory in the current directory having the
same name as a command.  The directory entry is superseding the command
completion.

 If you  sudo et<tab>  you get a list of completions.  In /etc, the only
entry for etckeeper is with a trailing /, rather than having an entry
for the command AND an entry for the directory.  If you are cded to
somewhere without an etckeeper directory present, etckeeper is fine.

 This happens with completion for any commands flagged to take another command 
as their first argument.  simple testcase:
mkdir apt-g{,et}
nice apt-g<tab>  =>  lists apt-g/   apt-get/
nice apt-ge<tab> => nice apt-get/

Probably fixable without disabling completing filenames as a fallback,
IDK.  _command_offset() is pretty complex, I'm prob. not going to try to
fix it myself.

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

Title:
  incorrect bash-completion for sudo

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to