由于原版本的命令很容易冲突,所以改了下命令
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
- cd bashmarks
- make install
- source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file
sss <bookmark_name> - Saves the current directory as "bookmark_name"
ggg <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"
ppp <bookmark_name> - Prints the directory associated with "bookmark_name"
ddd <bookmark_name> - Deletes the bookmark
lll - Lists all available bookmarks
$ cd /var/www/
$ sss webfolder
$ cd /usr/local/lib/
$ sss locallib
$ lll
$ ggg web<tab>
$ ggg webfolder
All of your directory bookmarks are saved in a file called ".sdirs" in your HOME directory.