Hacker News new | ask | show | jobs
by logn 4675 days ago
This article covers more advanced functionality than what's built in to shells but don't forget:

  cd -
That goes to previous dir. A utility that follows this convention but adds some more features would be nice. For instance, maybe typing 'cd -2' could take me back two spots in history, like a web browser.
2 comments

This is exactly what I was going to say, cd +n and cd-n work amazingly.
You can use pushp and popd for this.