While I was correcting bad formatting (thank you Google/Blogger) for my previous post about Apple and LLVM vs GCC, I realized I did not write about "new" Fedora 16 feature. Well, it's just a new package. But it rocks!

Autojump is a small utility written in Python which helps you to navigate through your directory structure. It "learns" directories you use the most and allows you to move, or jump if you want, them. Installation really cannot be easier:

$ yum -y install autojump

It is *huge* piece of software, "believe" me - 40 kB in total.


$ rpm -ql autojump
/etc/profile.d/autojump.bash
/etc/profile.d/autojump.sh
/usr/bin/autojump
/usr/bin/jumpapplet
/usr/share/man/man1/autojump.1.gz

After you install it let it collect statistics for a while, the longer the better. Then do this:


$ jumpstat
1.0:    /home/lzap/.xchat2/xchatlogs
3.0:    /home/lzap/bin
15.0:   /home/lzap/Download
32.0:   /home/lzap/CloudForms/katello
51.0:   /home/lzap/CloudForms/katello/scripts/system-test
120.0:  /home/lzap/Mutt
212.0:  /home/lzap/CloudForms/katello/src
Total key weight: 576. Number of stored paths: 37

To move or jump there is just an alias "j". Without parameters it loops through your first and second entries. To jump to particular entry just provide part of if. It is not case-sensitive, fuzzy algorhithms are also there to help you. Multiple calls loops as well:


$ j cloud
/home/lzap/CloudForms/katello/src
$ j cloud
/home/lzap/CloudForms/katello/scripts/system-test
$ j cloud
/home/lzap/CloudForms/katello
$ j cloud
/home/lzap/CloudForms/katello/src

It's cool, isn't it?