After trying such history-based automatic tools I found they lacked predictability for me.
So the very small 50 LOC kd was born:
kd # jumps to project top level (based on .git/Gemfile)
kd foobar "$PWD" # saves an entry named foobar pointing to $PWD
kd foo # jumps to foobar
cp qux $(kd foo) # expands to foobar's value
I should probably make it expand to absolute paths so that I could change "$PWD" to .
g . # add current dir to bookmarks
g # list bookmarks
g del # open bookmarks in vi (should use $EDITOR ...)
g <regex> # jump to first matching bookmark
Wonder how many monthdays I saved compared to colleagues still navigating manually :D
So the very small 50 LOC kd was born:
I should probably make it expand to absolute paths so that I could change "$PWD" to .https://github.com/lloeki/dotfiles/blob/master/shell/kd