eshell environmental variable not appearing in eshell

232 Views Asked by At

I'm having a go with emacs and as part of that I've started using eshell. One thing I do regularly in a shell is maven builds. For this I need certain environmental variables to be set. I have set an environmental var with setenv in my .emacs file and when I do C-x getnev I can see it. However if I call echo $MY_VAR in eshell I get nothing, can anyone help?

1

There are 1 best solutions below

3
On

You should set env variables in a bat or sh file which launches emacs. In this case the variables will be visible in eshell.