sd (shift directory) allows you to quickly change directories. It's wd for bash.
# add a shift point
cd /an/obnoxiously/long/path/that/i/often/use
sd add obx
# shift to that point
sd obx
# shift to a subfolder of that point
sd obx/subfolder/of/common/point
# remove a shift point
sd rm obx
# list all shift points and their destinations
sd ls
First, pull down the repo:
git clone [email protected]:rylnd/sd
Then, to install (or to get the latest version):
cd sd
setup/sd upgrade
For a one-off install, simply paste the following into your command line:
curl -sL https://raw.github.com/rylnd/sd/master/setup/sd | bash -s install
Define the sd script in your shell by adding the following to a shell startup file (~/.bash_profile
, ~/.bashrc
, etc.):
# define the sd function
source "<PATH_TO_SD_SCRIPT>"
Pull requests are always welcome.