Skip to content

Instantly share code, notes, and snippets.

@desertmonad
Created August 17, 2013 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desertmonad/6258429 to your computer and use it in GitHub Desktop.
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.
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