For my shell in Terminal, I use Z shell (zsh). After reading Rafe Colburn's blog entry on his zsh adventure, I decided to give it a whirl. (The blog entry on Fried CPU that he links to is also a great read for some additional background.) Z shell shares a similar history with bash, so it has a small learning curve for most users who are comfortable with general command line usage.
Why use Z Shell?
Here are a few of the reasons that I've kept it around:
- intelligent command completion: zsh was one of the first to implement fully programmable command line completion in the shell. The completion is also handled intelligently for many commands with regard to the context in which the command is being executed — for instance, if the tab key is pressed after typing
tar xvf, zsh intelligently only provides a list of tarred gzip files. The completion can also be customized to display the autocompletion results in a multidimensional list that is easily tabbed or arrow keyed through. This goes farther than file and directory names, too, and can include git branches, hostnames, usernames, command arguments, etc. This feature alone is enough reason to switch to zsh, and has lead to a signfinicant increase of productivity (or at least reduced frustration) in my workflow.
- spelling correction: I make a lot of typos when I'm in the shell for some reason — instead of having to retype (or edit from history) a whole command, a quick prompt, such as
zsh: correct 'giy' to 'git' [nyae]? makes life in the shell little bit more convienient.
- right-hand command prompt: this is one of the more vain reasons to choose a shell, but I like to see the full path of the directory that I'm currently in, without throwing my left-aligned command history out of alignment. For my right-hand command prompt, I have displayed the current git branch (if applicable) as well as the full path to the current directory. If the command in the left-hand prompt starts to bleed over into the right-hand prompt's area, the right-hand prompt disappears to avoid any confusion.
There is a lot more to zsh than just the few features that I've mentioned. I'm fairly confident that I still don't use it as effectively as possible, even after using it exclusively for about 6 months… although I do feel more comfortable than I ever did in bash. (I do still use bash for almost all SSH sessions, though, but that's due mostly to the ubiquity of bash and my laziness.) I've put the .zshrc file (zsh configuration file, in layman's terms) that I use on GitHub, and you can view it here. It's a forked version of Rafe Colburn's, with some additional prompt niceties.
Installing Z Shell on Mac OS X
Installation of zsh on OS X is very easy. To get started, to to Terminal > Preferences and select the Shells open with: setting as "command (complete path)", and type "/bin/zsh" in the text box below. Here's a screenshot of my settings:

You'll likely want to set up a custom .zshrc file like the one that I linked to above to improve compatibility with the Mac keyboard layout, but even that's not completely necessary (although it's highly recommended).