Getting a Hand With Bash
If you use the bash shell, or as many know it the terminal on a regular basis then there is a package that you can install that will make your life a whole lot easier. Firstly I’ll tell you a little bit more about it.
When I first started using Linux a friend told me to install this package. I never really understood what it exactly did, but using the terminal was a whole lot easier then using the command prompt in Windows. I couldn’t explain it but things just worked. Features that were missing from Dos were there. There was awesome auto completion that knew what I wanted to type. Over the years I became more accustomed to using Linux and the Bash shell. I upgraded hardware, changed distributions and never really noticed what I was missing out on. The other day I was thinking, wouldn’t it be nice if I could press tab and this would auto complete. Then it hit me, the package my friend had told me to install when I first was starting out. The package happened to be exactly for this purpose. Since I was a novice and he was helping me out I didn’t really have the time to ask about the details of every single package, so here I am now letting you in on a little secret.
The package I am talking of is bash-completion. It is available on most distributions including Slackware and Fedora. I’m sure Debian has it in its package list and there could possibly be ports of bash-completion to MacOSX and perhaps BSD. Once installed you may want to run the initilization command:
. /etc/bash_completion |
Once that is done, you will probably not notice a whole difference in use until you try to auto complete. Try SSH
There you have it, an inside secret. I was lucky to have a friend kind enough to tell me about this in the beginning but I was too ignorant to know what that package did. For you, if your looking to auto-complete in bash, just remember bash-completion.














