Saturday, November 29, 2008

Mac OS X Terminal - case insensitive auto-complete

An annoying thing with the Mac terminal is that, out of the box, the tab completion* is case sensitive. Perhaps in linux land this is ok because most things are kept lower case. But, many default folders in Mac Os X start with upper-case letters (Desktop, Pictures, Public, etc). So, to turn off the case-sensitive completion, simply type this on the command line:

> echo "set completion-ignore-case On" >> ~/.inputrc

Be sure to start a new terminal instance for the changes to take effect.



* (Tab completion is when you start typing a folder or file in the terminal/console and hit tab, it auto completes to any matches it finds. Very handy and if you don't already use it, you should!)

2 comments:

Costas said...

Dude, if you're at a unix prompt on OSX, maybe it's time to get used to a case sensitive shell because if you go to Linux or any other flavour of Unix you'll not be afforded said luxury of a case insensitive shell.

Time to man up and hit the shift key :)

Stefan said...

@Costas: That's incorrect; this will work on any system with bash as the shell, the default for most Unices.

Post a Comment