3

I created a new user on our Ubuntu server and I no longer have the bash auto/smart completion (pressing tab once finishes your current phrase if possible. Two tabs give you a ls).

Smart complete works fine as root, but I want to enable it for my user.

1
  • Sidenote: pressing tab as of now does an actual tab (6 spaces or so)
    – Jackson
    Feb 16, 2011 at 16:39

2 Answers 2

3

Setting set disable-completion On in /etc/inputrc (or ~/.inputrc) will disable readline's autocomplete. That would cause the Tab key to just tab.

Possibly having a shell other than bash could cause autocomplete to not work.

1
  • Ah you nailed it. a quick echo of $SHELL spit back "/bin/sh" -- I switch to bin bash and I'm back in business. Thanks to everyone for the quick help.
    – Jacksonkr
    Feb 16, 2011 at 17:08
2

Does doing . /etc/bash_completion as your user enable completion? If so, you can put it in your ~/.bash_profile file so that it gets run when you login.

4
  • 1
    I don't see an /etc/bash_completion, but I do see /etc/bash.bashrc and a folder called /etc/bash_completion.d/ which contains the files "apatch2.2-common", "debconf" and "insserv" -- any good?
    – Jackson
    Feb 16, 2011 at 16:37
  • Have you got the bash-completion package installed? If you do dpkg -l bash-completion the first two characters should be ii. If not, install it with apt-get install bash-completion.
    – sjr
    Feb 16, 2011 at 16:39
  • I believe the bash-completion package just extends bash's completion feature, I think that's what's commonly referred to as the smart-completion or Programmable completion. If I understand correctly, the standard completion isn't working either.
    – mazianni
    Feb 16, 2011 at 16:48
  • smart complete works for root, just not for my user.
    – Jacksonkr
    Feb 16, 2011 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .