nugcea
Last Updated: February 25, 2016
·
1.087K
· janosgyerik
32ef4e3e388cbadc756a008cade3ee6a

Case insensitive path completion in UNIX shells

At first I found it a bit strange that in Windows and Mac the tab completion of file paths ignores case. It works that way because they use a case insensitive file system by default, so ~/Documents and ~/documents are exactly the same thing.

After some time I got used to this behavior, which was easy, because I find it noticeably easier to type everything in lowercase without holding down the shift key. And when working in Linux/UNIX systems again I started missing it, and even became annoyed by having to press the shift key to spell things right again.

Luckily this is very easy to setup in Linux/UNIX, simply by adding this to your ~/.inputrc:

# case insensitive tab completion of file paths
set completion-ignore-case on

After you do this and open a new terminal (or a tab), you should be able to type path names without worrying about the case, and let <kbd>TAB</kbd> complete and correct for you. I confirmed in Linux and Solaris.

Say Thanks
Respond

3 Responses
Add your response

13351
D42a7264714dee5006b9c99d2567a320

Wow, I never knew that exists! Thanks a ton!

over 1 year ago ·
13402
D3b2094f1b3386e660bb737e797f5dcc

Nice!

over 1 year ago ·
13403
D3b2094f1b3386e660bb737e797f5dcc

Nice!

over 1 year ago ·
Filed Under