Tab completion, part 2
If you're new here, you may want to subscribe to my RSS feed.
In the last post we discussed how tab completion makes typing Unix commands much easier. The downside, as Janssen pointed out, is that tab completion is case-sensitive, so typing cd doc and hitting tab won’t complete cd Documents/. But there’s a way to change this.
In your home folder you’ll find a file called .profile that contains settings for working in the bash shell (which is what you do every time you use Terminal.) It’s sort of the “preferences” file for the command line. The .profile file can do a lot of things, one of which is making tab completion case-insensitive. (We’ll cover more uses of .profile later.)
Because .profile begins with a dot, it’s invisible to most Mac OS X applications. A notable exception is Smultron, a free text editor that has an “Open Hidden” option. You can either use Smultron to open .profile in your home folder, or open Terminal and type open .profile, which should open the file in Apple’s TextEdit. If you don’t have this file, you’ll just create a new empty file by the same name and save it.
The line you’ll add to .profile is the following:
bind "set completion-ignore-case on"
If your .profile contains other text, simply put this at the end on its own line. If you’re creating .profile from scratch, this is the only line you’ll need. Save and close .profile.
After closing and reopening Terminal, your tab completion should now be case-insensitive. If you type cd doc and hit tab, it should fill in cd Documents/.


The term shell can refer to any interface to a computer (in the sense that the shell is the outermost part, the part people interact with.) But more commonly, shell is another way of saying “command line interface” or
As long as you’re going to start using Terminal regularly, you might as well make it at home. You can drag the Terminal to your Dock for easy access. Also, you might want to change the look of Terminal by going to Window Settings in the Terminal menu. Switch the drop down menu to Color, then change the color to your liking. I personally like White on Black with a little transparency, but you can do whatever you like.