BASH Shell setup filename tab-completion case insensitive
Q. I’m using BASH shell filename tab completion feature to complete file names and other stuff. However default tab-completion in bash case-sensitive. It cannot show me /tmp/Y* or /tmp/Y* files. How do I force filename tab-completion in bash case insensitive?
A. According to bash man page completion-ignore-case set to Off. If set to On, readline performs filename matching and completion in a case-insensitive fashion. Readline has variables that can be used to further customize its behavior. A variable may be set in the /etc/inputrc file with a statement of the form. So all you have to do is type following command:
$ set completion-ignore-case on
You need to add set completion-ignore-case on to /etc/inputrc command:
vi /etc/inputrc
Append text as follows:
set completion-ignore-case on
Close and save the file. For more information read bash man page.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Understanding command line shell
- Shell Scripting: Convert Uppercase to Lowercase
- UNIX / Linux Decompress tgz / tar.gz Files
- FreeBSD Install BASH Shell
- Linux/UNIX: Rules for naming file and directory names
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: bash_shell, case_insensitive, customize, default_tab, file_names, readline, set_command, set_completion-ignore-case_variable, tab_completion, variables, vi_command



August 17th, 2007 at 4:16 am
For tcsh / zsh users:
set complete enhance
September 14th, 2007 at 10:55 am
Thanks to you. This enabled me to explore further on input configurations and startup settings
September 14th, 2007 at 10:58 am
Thanks to you. This enabled me to explore /etc more and will be helpful in startup settings and input configurations.