purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.43k stars 82 forks source link

Source a shell script #83

Closed CeleritasCelery closed 6 years ago

CeleritasCelery commented 6 years ago

At my company the envivroment comes from sourcing some shell scripts. For a multitude of reasons I don’t want to source these files in my login shell. Is there a way to have exec-path-from-shell to run a command (I.e. to source those files) before it loads the environment?

purcell commented 6 years ago

Not directly.

However, you could set exec-path-from-shell-shell-name to a shell script which sets that environment, and then execs your regular shell in that modified environment with the args it was passed.