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/chunkily/bashmarks.git
cd bashmarks
bash install.sh
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file
mark <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
mark -s <bookmark_name> - Saves the current directory as "bookmark_name"
mark -p <bookmark_name> - Prints the directory associated with "bookmark_name"
mark -d <bookmark_name> - Deletes the bookmark
mark -l - Lists all available bookmarks
mark -h - Shows this help
cd /var/www/
mark -s webfolder
cd /usr/local/lib/
mark -s locallib
mark -l
mark web<tab>
mark webfolder
Use aliases to allow invocation with a single letter command for maximum efficiency.
alias g='mark'
g locallib
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.
Use aliases to get the original behavior. Put the following in your ~/.bash_profile or ~/.bashrc file.
alias g='mark'
alias s='mark -s'
alias p='mark -p'
alias d='mark -d'
alias l='mark -l'