I have a bunch of projects in my ~/Documents
. I work almost exclusively in python, so these are basically all python projects. Each one, e.g. ~/Documents/
You should try something like autoenv if not direnv.
The first one is considered to be "lightweight", while the second one "simply, higher quality software", listening respectively to each one's author, talking about the other one's project. Thus, they seem to me fairly good options, to try both!
Anyway, both have been tested on zsh
shells.
In particular, autoenv
is really simple to use, after installing it:
$ git clone git://github.com/inishchith/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc
just "follow the white rabbit " and try for example
$ mkdir project
$ echo "echo 'whoa'" > project/.env
$ cd project
whoa
"If a directory contains a .env
file, it will automatically be executed when you cd
into it. When enabled (set AUTOENV_ENABLE_LEAVE
to a non-null string), if a directory contains a .env.leave
file, it will automatically be executed when you leave it."
Have a look at https://github.com/inishchith/autoenv for more detailed instructions!...