2 Bash tricks: TAB-TAB and Case Insensitive Completion

In this article I will show you two bash inputrc tricks.

Watch Free Movies

The first one is: set show-all-if-ambiguous on. Add this to your ~/.inputrc file because it is very usefull. When pressing TAB for command completion, all the matches will be displayed, even if they are ambiguous, as if you have pressed TAB twice (TAB-TAB).

The second one is: set completion-ignore-case on. By adding this to your ~/.inputrcfile, you will make the tab completion incase sensitive.

For example, if you write cd ~/des[TAB] you will get ~/Desktop.

To benefit from this two cool features, add this lines in your ~/.inputrc file. Or, to make this modifications global, add the two lines in the /etc/inputrc file.

$ echo 'set show-all-if-ambiguous on' >> ~/.inputrc
$ echo 'set completion-ignore-case on' >> ~/.inputrc

$ cat ~/.inputrc
set show-all-if-ambiguous on
set completion-ignore-case on

Scroll to Top