This fork of bashmarks adds several key enhancements and aims to be an active and up-to-date replacement for the original (which appears to no longer be maintained).
- git clone https://github.com/felipe-b-oliveira/bashmarks.git
- cd bashmarks
- make install
- add optional command prefix
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file
Because the aliases that Bashmarks uses might already be in use on your system, Bashmarks allows you to specify a "command prefix":
export BASHMARKS_PREFIX="bm"
If this is specified, the prefix must be used before any Bashmarks command; if it is not specified, the aliases can be used as-is.
<command_prefix>s <bookmark_name> - Saves the current directory as "bookmark_name"
<command_prefix>g <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
<command_prefix>p <bookmark_name> - Prints the directory associated with "bookmark_name"
<command_prefix>d <bookmark_name> - Deletes the bookmark
<command_prefix>l - Lists all available bookmarks
$ cd /var/www/
$ <command_prefix>s webfolder
$ cd /usr/local/lib/
$ <command_prefix>s locallib
$ <command_prefix>l
$ <command_prefix>g web<tab>
$ <command_prefix>g webfolder
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.