Bashmarks is a shell script that allows you to save and jump to commonly used directories. Now supports tab completion.
Credits: this is a fork from the original repo: huyng/bashmarks, the main change is changing the s,g,p,d,l command to st,gt,pt,dt,lt.
- git clone https://github.com/bofeng/bashmarks.git
- cd bashmarks
- make install
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc or ~/.zshrc (if using zsh) file
st <bookmark_name> - Saves the current directory as "bookmark_name"
gt <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
pt <bookmark_name> - Prints the directory associated with "bookmark_name"
dt <bookmark_name> - Deletes the bookmark
lt - Lists all available bookmarks
$ cd /var/www/
$ st webfolder
$ cd /usr/local/lib/
$ st locallib
$ lt
$ gt web<tab>
$ gt webfolder
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.