Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I work inside thin LXC container on 12.04 I have only very basic system. In particular the /etc/bash_completion.d is missing the e.g. apt, that I find particularly useful.

Is there any standard package, that installs the autocompletion for the apt, or should I copy the file manually? And just copying the files into /etc/bash_completion.d manually just doesn't seem to work.

I use bash as my command interpreter.

What am I missing here?

share|improve this question
add comment

2 Answers 2

Are you even runnning Bash?

Try bash. Does something@somewhere ~:$ appear and is autocompletion reanebled? If so set default bash by chsh /bin/bash.

More information in this answer.

share|improve this answer
    
Yes I run bash, but it is a good remark. –  Adam Ryczkowski Oct 27 '12 at 9:52
    
I believe you forgot the command argument. Should be: chsh -s /bin/bash. Otherwise chsh tries to find user /bin/bash... –  Adam Ryczkowski Oct 27 '12 at 9:54
add comment
up vote 1 down vote accepted

OK, I found the problem.

There are 4 essential things required for auto completion:

  1. Bash
  2. Executable script /etc/bash_completion (this is the part I was missing)
  3. Not-executable scripts in folder /etc/bash_completion.d. I believe they get installed silently together with the associated packages.
  4. Execution of the script /etc/bash_completion within the Bash (the standard ~/.bashrc takes care of that)
share|improve this answer
    
You can mark your own answer as the right answer. –  OrangeTux Oct 27 '12 at 12:32
    
@OrangeTux I will... But "You can accept your own answer in 2 days" - says AskUbuntu.com –  Adam Ryczkowski Oct 27 '12 at 12:43
    
Of course, I forgot that. –  OrangeTux Oct 27 '12 at 13:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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