Monday, April 29, 2024
115
rated 0 times [  115] [ 0]  / answers: 1 / hits: 111385  / 2 Years ago, sun, february 13, 2022, 3:41:17

At some moment, the apt-get install autocomplete was broken. It was very useful to me to see the names of packages available for installation when pressing Tab.


For example, if I would press the Tab key after sudo apt-get install ruby, all packages starting with ruby would be displayed, such as ruby-mysql, ryby-dev, etc.


Instead of this behavior, if I press Tab, I get a list of directories, as I get when I use cd and press Tab.


How to repair this autocomplete?


More From » command-line

 Answers
7

As stated in the comments to the other answer, first make sure that bash-completion is installed:


sudo apt-get install bash-completion

and apparently for @diapir, it helped to reinstall it:


sudo apt-get install --reinstall bash-completion

However, for me, the problem was not that bash-completion was not installed or broken, the problem was that I had accidently deleted my .bashrc file. You can get a new one by copying it from /etc/skel:


cp /etc/skel/.bashrc ~/

[#41561] Monday, February 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingssex

Total Points: 21
Total Questions: 122
Total Answers: 98

Location: Sweden
Member since Fri, Mar 26, 2021
3 Years ago
;