0

Instead of using cd, pushd, popd, and cdable_vars, and CDPATH, I heard a while ago that there was a tool that "learned" the paths you most frequently navigated to and make shortcuts for those dynamically. Does anyone know what tool I vaguely have in mind?

muru
  • 193,181
  • 53
  • 473
  • 722
dan
  • 2,995
  • 5
  • 32
  • 37
  • Probably this one [Dynamic Shortcut Creation with Bash](http://arun.chagantys.org/blog/?p=293) – Basharat Sialvi May 17 '12 at 05:59
  • 3
    Possible duplicate of [Short-cut for switching to a given directory](https://askubuntu.com/questions/226417/short-cut-for-switching-to-a-given-directory) – muru Sep 28 '18 at 04:43

2 Answers2

0

Here's a link from the LinuxJournal with script that would do just this:

http://www.linuxjournal.com/article/10585

Mordoc
  • 2,054
  • 1
  • 14
  • 24
0

Add the following to your profile...

alias ycd+='pwd>>$HOME/.ycd_list;sort -u -o $HOME/.ycd_list $HOME/.ycd_list'
alias ycd='select ID in $(<$HOME/.ycd_list);do [ $ID ] && cd $ID;break;done'

Use ycd+ to bookmark a directory and use ycd to navigate betwwen bookmarked directories.

Original post http://www.unix.com/302288249-post4.html

Ygor
  • 1
  • 1