AKRABAT

One of my favourite command line utilities is autojump. It’s a small command line utility that allows you to change directory without having to remember exactly where that directory is.

For example, to start working on OpenWhisk, I simply type:

j openw

And the current directory is changed to /Users/rob/Projects/openwhisk/incuator-openwhisk for me.

This is much easier than typing cd ~/Pro{tab}op{tab}in{return}!

Biasing towards a particular directory

When you have a directory that’s a common one that you always want to get to first, you can bias autojump to find it. I use this for j 2018 which I always want to select the directory where my talks are at ~/Dropbox/Presentations/2018 (this year) rather than one of the many other 2018 directories on my system such as ~/19FT/Accounts/2018 and ~/19FT/Contracts/2018, etc.

To do bias a directory, change to it and then type:

J -I 9999 .

This increases the weight of this directory in autojump’s list by an additional 9999 which then makes it the most important one.

Install it

It’s available for macOS via Homebrew (brew install autojump) and Linux (apt-get install autojump, yum install autojump) and can probably be built for every other *nix. It even works on Windows, so there’s no excuse for not making directory navigation that much easier!

Source: AKRABAT