kennethreitz/autoenv — pull request #20 by nvie (2012-03-29 07:57:46+00:00)
Title: Helper method `use_env` to load virtualenvs quickly.

The function `use_env` is added to the autoenv shell script, so it is sourced and available to be used inside `.env` scripts. This makes it easy to declare what virtualenv should be loaded or created when switching to a specific dir.

For example:

use_env myenv

The function is cheap when the environment is already active and will only invoke the expensive `workon` and `mkvirtualenv` commands when absolutely necessary.

### Disclaimer
You could argue that autoenv is not the best project to bundle this script with and you should be better off including it in `.zshrc`, but I think a lot of people can profit from this as activating virtualenvs is the main use for autoenv anyway.

So, :sparkles: :cake: :sparkles: ?