Closed jellelicht closed 3 years ago
Thanks, but please could you explain the scenario this fixes, ie. with a sequence of actions and observed/expected results?
My example is about eshell
, but it should really work with any buffer that can have changes to the value of its default-directory
. Right now, after ‘activating’ a direnv environment with envrc-reload
or envrc-load
, you are stuck with it; you can either choose to ‘reload’ a different environment, or disable envrc entirely.
Imagine I have an .envrc
in ~/Documents
:
M-x eshell
cd ~/Documents
M-x envrc-allow
M-x envrc-load
Now I have my envrc environment available;
cd ..
Great, yes, that makes sense. Merged, thank you!
Is this hideous? Yes. Is this correct? No.
Does this work? It does, for me 😄
Fwiw, adding
envrc—update
to botheshell-load-hook
andeshell-directory-change-hook
make this fairly convenient to work with from eshell.