This is a fork of djoot/all-bash-history. It uses only the acd_func.sh file, tweaked to become interactive. djoot's solution is simply printing the output, so you had to issue the command again with the correct number.
I've placed the file to my ~ foler, and appended the block bellow to my ~/.bashrc (rename the file to your convenience)
if [ -f ~/acd_func.sh]; then
. ~/acd_func.sh
fiThen, simply use you cd command like before (don't forget to source ~/.bashrc to apply your changes!):
cd -to go back to the previous directory;cd --to issue the interactive prompt, and then input the desired numbercd -nto go back to the nth directory, if you know what number it has. e.g.: go back to where you were 3 directory before:cd -3.
Interactive history:
antonin:~$ cd --
0 ~
1 ~/Downloads/test
2 ~/Downloads
Chose your path index: _Direct manipulation:
antonin:~$ cd -2
antonin:~/Downloads$ _The tool in action:
