Closed doolio closed 2 years ago
Nothing in envrc.el is specific to virtualenvs, so that's not really possible. I don't use eshell
, but presumably the eshell
prompt can run arbitrary elisp, so it could simply inspect (getenv "VIRTUAL_ENV")
and extract the relevant part, e.g. using (file-name-nondirectory (getenv "VIRTUAL_ENV"))
.
I see. Your assumption about eshell
is correct. Thanks for the snippet. It gives me something to work with.
Would it be possible to add a
envrc-venv-name
variable and ideally for its value to just be the pertinent part? That is saydirenv
exportsVIRTUAL_ENV
with a value of/home/doolio/projects/learning/python/atbs/.direnv/python-3.9.2
thenenvrc-venv-name
would have the valuepython-3.9.2
?I'm hoping that I could then somehow add that information to my
eshell
prompt like I can do in a bash terminal.Thanks for your time.