Skip to content

Instantly share code, notes, and snippets.


Mike Stringer stringertheory

View GitHub Profile
stringertheory / .auto_virtualenv
Last active Aug 29, 2015 — forked from clneagu/.bashrc
put this in .bashrc to change to environments created with virtualenvwrapper automatically
View .auto_virtualenv
# Call virtualenvwrapper's "workon" if .venv exists. This is modified from--
# which is linked from--
check_virtualenv() {
if [ -e .venv ]; then
env=`cat .venv`
if [ "$env" != "${VIRTUAL_ENV##*/}" ]; then
echo "Found .venv in directory. Calling: workon ${env}"
workon $env