Hacker News new | ask | show | jobs
by timtadh 4859 days ago
I handle this issue (and a bunch of other environment variable issues) with a little utility I wrote.

https://github.com/timtadh/swork

It basically figures out the pid of your shell and dumps the environment variables into a file in /tmp/swork. Then you make custom activate scripts for all of your projects. It has really helped me deal with a lot of projects. It also has convenience functions for quickly cd'ing to any project.

When you want to get back to the original configuration it simply restores the original environment vars.