jocelynmallon/zshmarks — pull request #6 by drewsberry (2014-08-20 22:24:43+00:00)
Title: Use and parse HOME environment variable

This commit changes the way bookmarks are stored if and only if they are subdirectories of your home directory. It replaces `/home/uname` with `$HOME`, and uses `eval "cd ${dir}" instead of just `cd "${dir}" so that the `$HOME` environment variable is parsed into `/home/uname` when you run `jump bookmark`.

The idea is that you should be able to have bookmarks referring to the same general locations in your home directory, which are valid across multiple machines that may have different usernames and home locations, so long as they have the same subdirectory structure.

This is particularly useful if you keep your dotfiles like your `.bookmark` file in a git repo, so that all you need to do is `git clone` it and even if it's a different machine/operating system (Linux or Mac OS), the bookmark files will work just fine (provided you retain the same subdirectory structure).