export CDPATH=.:~/.marks/
function mark {
ln -sr "$(pwd)" ~/.marks/"$1"
}
mark @name # create a bookmark
cd @name # jump to bookmark
cd @<tab> # list bookmarks
cd @n<tab> # auto-complete
cd @name/<tab> # can access sub-directories within bookmarks
Works best when bookmarks are prefixed by "@" or other special symbol. Additional advantage is that you can use the same function `cd` to navigate both bookmarked and regular directories.
Might be worth pointing out the author of the post you linked settled in the end on `cd` and `ls` in a different style of organization over bookmarks or `z` or any other tool.
[1]: http://karolis.koncevicius.lt/posts/fast_navigation_in_the_c...