Monthly Archives: August 2017

Migrating from autojump to fasd

fasd is an autojump clone with some nice extra goodies.

In case you don’t know either (let aside any of their many variants, like z, v, …), they all are shell hooks that learn from your filesystem browsing habits, by keeping a database of the paths you access with cd along with their frequency of visit.

This data comes particularly handy when used together with a (generally single letter) command that lets you fuzzy match against a path name, guess the most likely occurence, and send you automatically to it.

For instance, a lengthy cd ~/Developments/MyFavoriteLang/TheProjectType/MyHotProject can often be replaced by j d mhp which is arguably a huge keystroke, time and mind saver. One really has to try it to seize the full benefit.

Anyway, most of the value of such a tool boils down to the completeness and relevance of the underlying paths database, which makes switching from a tool to the alternative very tedious and counter-productive. Hopefully the file format is so simple that in case of a transition from autojump to fasd, it’s as simple as running the following:

cat ~/.local/share/autojump/autojump.txt | pyle -e "words[1]+'|'+words[0]+'|'+str("$(date +%s)")" > ~/.fasd

As to the reasons that pushed me towards fasd, well, the main one is that it also remember files (on top of directories), so it’s possible to use it to invoke vim or xdg-open on recent or frequently accessed files.

Donate Dogecoins: DJi4fgSMxcq5vRjytvCEq9A1TVsDZevd7c Whats This?