Download or copy and paste b.sh and b_completion.sh to a directory.
In your .zshrc or .bashrc file add:
source /path/to/b.sh
source /path/to/b_completion.sh
Close terminal or source .zshrc or source .bashrc
b [bookmark] [directory]
b [bookmark] [file]
-h, --help Show this help screen
If b is run with no arguments, it will list all of the bookmarks.
If it is given a bookmark that is a directory, it will attempt to cd into that bookmark.
If it is given a bookmark that is a file, it will attempt to open that bookmark.
If it is given a bookmark and directory or file, it will create that bookmark.
$ b home /home/user
Added home,/home/user to bookmark list
$ b p /home/user/.profile
Added p,/home/user/.profile to bookmark list
$ b
List of bookmarks:
home,/home/user
p,/home/user/.profile
...
$ b home
will cd to the home directory
$ b foo .
will bookmark current directory as foo
$ echo `b home`
/home/user
$ b p
will open ~/.profile
If your computer is a Mac, it will use the `open` command, otherwise it
will use the `$EDITOR`.