I'm using 12.04.2 and auto-completion for mount does not work with sudo. If I don't use sudo auto-completion works as expected:

$ mount --bind -t devpts /dev/<press tab>
block/      char/       dri/        input/      pts/        .udev/
bus/        disk/       .initramfs/ net/        snd/        vboxusb/

This is very annoying when you have paths like /media/<uuid>. Also this is the only command I have seen that does this: sudo umount or sudo apt-get works as expected.

So how can I debug the problem/fix this?


There are multiple solutions which are situation specific. There are two links, which you can try to fix your system.

Link 1

Link 2

Autocomplete works fine for me in sudo. Anyways, one way to work with this until its fixed, is to type the whole command first, and then press Home key and add sudo.

| improve this answer | |
  • 1
    Sorry for the late reply. complete -cf sudo makes it work again. Thanks! – Salem Sep 18 '13 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.