AutoJump my most used shell utility
September 25, 2009 in releases by Barry Kukkuk
So the thing with developing in Linux is that you’re going to use the shell a lot. And the other thing with Linux is that most things are in a deep directory hierarchy. I find myself changing to different directories with long names a lot.
Even with tab-completion, it becomes really tiresome, and slows me down.
I know about pushd and popd which allows you to make a kind of directory “stack”. And it helps, but I don’t necessarily always go back in reverse order.
I’ve found this little utility called autojump. What it does is learn the directories that you use most often, assigning weights to the ones you use more frequently. So after a while of using the normal cd command, it has a pretty good idea of where you usually go.
Now you can jump to the directory you want, by issuing a very short command. For example:
cd ~/projects/MyProject/app/view/users
becomes
j users
And if there are a few directories you jump to with “users”, it will automatically go to the most-frequently used one. Or you can type j users and press Tab, which will give you a numbered list of all “users” directories in it’s list.
And the other kicker is that it’s case-insensitive.
Go, and be productive!