Autoenv: Directory-based Environments
Magic per-project shell environments. Very pretentious.
What is it?
If a directory contains a
.env file, it will automatically be excecuted
cd into it.
This is great for...
- auto-activating virtualenvs
- project-specific environment variables
- making millions
Foreman env files are completely compatible.
You can also nest envs within eachother. How awesome is that!?
Follow the white rabbit:
$ touch project/.env $ echo "echo 'woah'" > project/.env $ cd project woah
Install it easily:
Mac OS X Using Homebrew
$ brew install autoenv
$ pip install autoenv
$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv $ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc
Unless you are using zsh as your shell, autoenv overrides
cd. If you already do this, invoke
autoenv_init within your custom
cd after sourcing
If you are using zsh as your shell, autoenv will use the
chpwd_functions instead of overriding
cd. So even if you already override
cd, everything should still work fine.
Install the test runner:
$ make gem install dtf --version 0.1.2 Successfully installed dtf-0.1.2
$ make test dtf tests/* ............ ##### Processed commands 14 of 14, success tests 12 of 12.