A Year of Z
Z is a replacement to cd
, that allows you to jump directly to a certain directory by providing a set of regexes. For example, z kolm
takes me to the directory ~/thirdparty/kolmafia/
, and at work, z les2 mgt
takes me to ~/ctg-twc/infrastructure-modules2/mgt
.
It works by tracking your most used (“most frecent”, for frequent + recent) directories, then sending you to the most frecent that matches all the regexes you provide.
I’ve set it up on all my computers, and it’s changed a lot: I now no longer need to remember how to use a folder structure. I can just put things somewhere, and so long as I accessed it fairly recently, z
will take me there (or z -l
will show me the options).
I haven’t yet set up my directories so they don’t share short substrings, but this would be a good idea to make it convenient to ensure I can go places easily. For now, z twc hyb
goes one place and z hyb twc
another, and if I can’t quite remember which is which, not much time is lost.