How do you set up the Z shell such that typing cd - gives you a list of previously visited paths, and cd -1, -2, -3, etc. will then take you to the directories?
c- minus is designed for this kind of requirement.
It support regex match, using md5 hash to void duplication in pushd.
pushd
Easily to dump and load.
This gif shows some basic operations.
you can check it out on https://github.com/whitebob/cminus