How could I use something similar to cd -
, which goes to the previous directory in history, in order to go back even further in directory history? For instance lets say my history is: (1 being current.)
- ~/
- ~/otherDirectory
- ~/really/long/directory/name/that/i/don't/want/to/type/again/but/dont/use/enough/to/make/an/alias/for
Using cd -
here would bring me to ~/otherDirectory
#2, and if i use it again it brings me back to ~/
#1(which I don't want to be in) rather than to the really long directory #3(which I do want to be in). In summary how do I navigate further back into directory history? Is there some bash I could write to add this functionality?
I am trying to go back through directory history, (more than just one directory) much like one would go through command history using the up arrow. Hopefully this clarifies that this question has not been asked before.