This script provides an easy way to jump around the filesystem if (and only if) you’re using my Tag Filer system. In that system, you tag main “context” folders with “=Tagname,” and target subfolders (project folders) with “@projecttag.” The Tag Filing system allows me to tag individual files and folders with a “#Tagname” (target context) and “:project:chain” tags to have Hazel automatically move them to their destination and maintain both a shallow folder system and a tag-based search system. Get more info here.
If you have such a setup, you can source the function below in your profile and have a cdt
command available. Then, typing cdt work projectx
will jump to the folder tagged “@projectx” inside of the context folder tagged “=Work.” The command requires a context as the first argument, and any subsequent tags are project folders, but it’s forgiving about capitalization and partial tags.
In fact, it’s even fuzzy, so you could type cdt wrk projx
. You can also reach subfolders in sequence, which is handy because after the project folder I often have subfolders (e.g. asset folders) with the same name as other projects’ folders. In this scenario, cdt wrk projx img
will jump me to ~/Dropbox/Work/project-x/images/
instantly.