Skip to content

Instantly share code, notes, and snippets.

View ajself's full-sized avatar
🏠
Working from home

AJ Self ajself

🏠
Working from home
  • Ford Motor Company
  • Minneapolis, MN
View GitHub Profile
@ajself
ajself / venv.sh
Created March 18, 2013 20:10
a simple hack to change virtualenvs ala .rvmrc like. Create a file called .venv in the project dir with the name of the virtualenv you want to use. This infers you are using pythonbrew.
has_virtualenv() {
if [ -e .venv ]; then
pybrew venv use `cat .venv`
fi
}
venv_cd () {
cd "$@" && has_virtualenv
}
alias cd="venv_cd"