This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your .bashrc or .bash_profile to set up "bookmarks" for your directories. | |
# When in a directory, type "s <name>" to store the current path as a bookmark with that name. | |
# To move to a bookmark, type "g <name>". Tab completion also works! | |
# To list all bookmarks, type "l". | |
# | |
# Credit to: Karthick from http://www.huyng.com/archives/quick-bash-tip-directory-bookmarks/492/ | |
function s { | |
cat ~/.sdirs | grep -v "export DIR_$1=" > ~/.sdirs1 | |
mv ~/.sdirs1 ~/.sdirs |
NewerOlder