At our last PYPTUG meeting, I was demoing Dshell. While at it I suggested using the j command. AKA, autojump:
On some linux distros, it is possible to install from the repo. On debian and derived systems (ie, ubuntu, mint etc), instructions to enable it after the install are in /usr/share/doc/autojump/README.Debian
Once installed and trained, you'll ask yourself how you've been able to live without it.
The j command itself is defined within a shell file. For example, for bash, you'll find this piece of code:
|autojump: directory not found|
|Try autojump --help information.|
Although this part is all bash scripting, the actual autojump command is written in something else altogether.
Autojump has been around for many years, to this day, few people actually are aware of it. In fact, as I typed j, a quick survey around the room confirmed my gut feel.
I have blogged and tweeted about it before, but mostly in passing. Hopefully this post will bring a bit more exposure to this really useful tool.
And, do have a look at the python code ( https://github.com/joelthelion/autojump/blob/master/bin/autojump ). It has some interesting use of the lesser known SequenceMatcher class of the difflib module, and good use of lambdas. Oh, and yeah, it's pep8 formatted. Thank you.