Created
August 17, 2013 19:45
-
-
Save desertmonad/6258429 to your computer and use it in GitHub Desktop.
Some helper functions to save a pwd and load it back later. It assumes you have a directory called .dirs in your home directory.
This file contains 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
function store { | |
echo $PWD > ~/.dirs/$1 | |
} | |
function load { | |
if [ -f ~/.dirs/$1 ] | |
then | |
cd `cat ~/.dirs/$1` | |
else | |
echo "$1 not found" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment