My little friend z

WOPR

I’m a command line interface kind of guy, which is funny since I do everything on Macs. Then again, I first embraced PCs with an Apple IIe, which was a CLI only experience.

One little tool I’ve had installed for a while is z by Rupa. It’s a nice little shell script that keeps tabs on the directories you’ve been cding in and out of and then lets you quickjump to them using a simple regex. So instead of remembering a long path like:

$ cd /Users/shibuya/github/octopress

I can just do something like:

$ z octo

If I have two directories with similar names, like website_development and website_master I can differentiate them like so:

$ z web d 		# Will cd to /website_developement
$ z web m 		# Will cd to /website_master

All in all it saves me quite a few keystrokes. Check out more examples in the README.

Comments