Hacker News new | past | comments | ask | show | jobs | submit login

Here is one additional bookmark solution [1]:

    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.

[1]: http://karolis.koncevicius.lt/posts/fast_navigation_in_the_c...




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.


Pretty sure this would change into the symlinks, not the linked directories. I.e. the $PWD would be under `~/.marks/`.


Personally - never noticed a problem, but should be easy to solve just in case:

    alias cd="cd -P"


I have seen many solutions like this but this one is by far the most lightweighted. Thank you for sharing.


This is AWESOME. Thank you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: