Make bash's tab-completion case-insensitive [duplicate]

Possible Duplicate:
Case insensitive tab completion in Bash

Is there any way to make the tab-completion in bash case-insensitive? For instance, if I have a file called Hello.txt and try to tab-complete it by typing he followed by Tab it will not work. I would have to tab-complete it by typing He (note the capital H) and Tab. Is there any way to set up bash so I don't have to preserve the case when I type it and try to tab-complete it?


Solution 1:

Create a file named .inputrc in your home directory, and place this line in it:

set completion-ignore-case on

Then open a new shell and try it out. If /etc/inputrc exists on your system, you should generally also add the line $include /etc/inputrc. But there's no way to make this conditional, so you should only add it if that file exists.