I'm tired of doing long `cd` commands to other directories, so I want to make a little tool for jumping to the most recent folders.

I've searched and haven't found any sort of API that would let me trigger a process when a `cd` command is run. Can somebody point me in the right direction?

Working off the `bash_history` seems inefficient, and isn't always enabled.