Skip to content

Instantly share code, notes, and snippets.

@jgeewax
Created August 20, 2010 23:23
Show Gist options
  • Save jgeewax/541408 to your computer and use it in GitHub Desktop.
Save jgeewax/541408 to your computer and use it in GitHub Desktop.
function jumpto {
if [ -z "$1" ]; then
deactivate 2>/dev/null
cd $HOME
return 0
fi
local DIRECTORY=$HOME/workspace/$1/src
if [ -d $DIRECTORY ]; then
deactivate 2>/dev/null
cd $DIRECTORY
if [ -d $DIRECTORY/environment ]; then
source $DIRECTORY/environment/bin/activate
fi
else
echo "Invalid workspace! ($1)"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment