Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

direnv should have been part of unix/linux/posix environments from the start. Whenever something's install steps tell you "go add this export statement to your .bashrc" or similar, it never sat well. That sort of thing should be scoped by path, and shell independent -- exactly the thing direnv enables.


The first thing I did recently in some cleanup work for a team was set up direnv and have it auto-switch kubernetes context by location.


I was reading the thread and thinking "this is a cool tool, might use someday".

>have it auto-switch kubernetes context by location

Now I'm sold, thanks!


I never understood why people were so enamored with direnv, but this makes me understand it a bit. I don't think I need it right now, but I'll keep it in mind for this use case.


I alias ~~ to load .env if it exists, and unload the custom pieces if it doesn’t. I’ve seen people do that with :: as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: