Install Rupa Z to Replace Your Command Line CD
z is a command line script to help you “jump around” to directories.
Very much like
cd – change directory – command, but much more powerful. Watch z in action.
Since I installed oh-my-zsh, I can install it easily be editing the
~/.zshrc. Simply add
z as a plugin. Here’s mine plugins:
plugins=(git osx python sublime z)
How to use
It takes some time for z to learn your directories. So you will need regular
cd before you can
Suppose you have a project directory at
# cd to the path first cd ~/Workspace/nodejs/heroes/ironman/
Now, z understand you have such a path, and is able to let you jump around easily from anywhere.
The above will jump to
ironman directoy right away.
In fact you
z heroes, or
z man will jump to the same