I've been using the `fish` shell for a year, and I just found out about `prevd` and `cdh`  

https://fishshell.com/docs/current/cmds/prevd.html

prevd - move backward through directory history — fish-shell 3.7.0 documentation