Closed kenoss closed 6 years ago
Thanks for taking the time to submit this, but I'm going to decline it: firstly, the purpose of exec-path-from-shell
is to duplicate the environment variables you would see if you ran a regular terminal, and so that places this addition out of scope.
But more pertinently, you could likely achieve this simply by setting exec-path-from-shell-shell-name
to the path of a script which runs bash
however you like.
It's OK. I see your decision.
Hi.
Problem
I use Emacs.app on OSX. The application is launched without my normal shell environment. So I have to use correctly this package; launch shell in emacs and get variable.
I have separated bash/zsh configuration files and one of them
~/.zsh.d/foobar/path.sh
is about exporting environment variablePATH
. So I thought that correct way to tellexec-path-from-shell
to use this file is the below setting:Althogh it does not work. AFAIK, reading
man bash
and examined as below,--rcfile
option is not available in non-interactive mode, and there's no way to source before executing command (of-c
option).Solution
Use explicit
source
before target command.This is archived by this PR. I added new variable
exec-path-from-shell-rc-file-path
for the sourced file path string, because the existing variableexec-path-from-shell-arguments
is not sufficient for it.I tested with below setting and it works correctly:
What do you think?