Bashmarks is a shell script that allows you to save and jump to commonly used directories. Now supports tab completion.
- git clone git://github.com/sathishvj/bashmarks.git
- cd bashmarks
- make install
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file
sb <bookmark_name> - Saves the current directory as "bookmark_name"
cb <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
pb <bookmark_name> - Prints the directory associated with "bookmark_name"
db <bookmark_name> - Deletes the bookmark
ob <bookmark_name> - Open in Finder (mac only)
lb - Lists all available bookmarks
Note: tab completion for subdirectories doesn't work properly on mac but seems to work well on ubuntu.
$ cd /var/www/
$ s webfolder
$ cd /usr/local/lib/
$ sb locallib
$ lb
$ cb web<tab>
$ cb webfolder
Additional feature added:
$ cb webfolder/logs/abcd
This will take you to /var/www/logs/abcd
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.