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/huyng/bashmarks.git
- make install
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file
s <bookmark_name> - Saves the current directory as "bookmark_name"
g <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
p <bookmark_name> - Prints the directory associated with "bookmark_name"
d <bookmark_name> - Deletes the bookmark
k - Lists all available bookmarks
l - Lists all files in current directory
c <folder_name> - Goes to a directory and lists all files
cdir <folder_name> - Enter the new folder, if not exists, create one and enter
$ cd /var/www/
$ s webfolder
$ cd /usr/local/lib/
$ s locallib
$ k
$ g web<tab>
$ g webfolder
$ l
$ c /home/
$ cdir newdir
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.