Skip to content

Instantly share code, notes, and snippets.

@vdboor
Created August 28, 2013 11:24
Show Gist options
  • Save vdboor/6365007 to your computer and use it in GitHub Desktop.
Save vdboor/6365007 to your computer and use it in GitHub Desktop.
Switch to a directory when entering a virtualenv
#!/bin/bash
# This hook is run after this virtualenv is activated.
root="$HOME/Sites/example.org/"
# Change to root unless already there.
if [[ "`pwd`" != "$root"* ]]; then
cd "$root"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment