Integrate eshell with direnv

Hey guys, I was wondering if anybody has tried this? I really enjoy direnv integration with emacs through envrc, however it doesn’t really work with eshell. It would be nice that changing dirs in eshell would load or unload the .envrc file if there is any of that directory. Right now I just manually call envrc-allow from the prompt whenever I want to load the projects env.

I was going to do a wrapper function around envrc-allow and add it to eshell-directory-change-hook but I was wondering if someone had already done this. Also, if we come up with a nice hack maybe It would be nice to PR this upstream, just a thought.

2 Likes