Short Tip: Bash tab completion with one tab

shell.png
Tab completion is awesome. It helps to quickly call commands without typing it entirely. For example in my home directory there is the directory Downloads. If I want to change into it in a Bash-shell I simply have to enter cd Dow [tab]. After the tab-press the directory name is completed automatically. To enable this feature you have to install the appropriate package. In Feodra it is bash-completion, most distributions call the package similar.

However, sometimes there are more choices:

$ cd Do
Dokumente/ Downloads/

In that case tab has to be pressed two times to unveil the two options. To have both options already on the first tab, create the file ~/.inputrc and enter the lines

set show-all-if-ambiguous on

As usual, if you have other useful and short tips regarding Bash or the command line please let me know.

(Yes, I know about zsh’s great completion tool. Yes, I already used zsh quite some time. No, a tip how to set up Bash/ZSH with a fifty lines bashrc/zshrc is not suited for a comment here.)