Code: Here's something I came up with recently -- it's actually
an evolution of the idea of pushd and popd, as included
in BASH.
To quote the POD docs:
cdhistoryis a perl script used to implement web-browser style "history" for UNIX shells; as you use thecdcommand to explore the filesystem, your moves are remembered, and you can go "back" through history, and "forward" again, as you like.
Download the perl script here.