shell-copy-environment-variable
shell-copy-environment-variable is an interactive compiled Lisp function in `shell.el
'.
(shell-copy-environment-variable VARIABLE)
Copy the environment variable VARIABLE from the subshell to Emacs.
This command reads the value of the specified environment variable
in the shell, and sets the same environment variable in Emacs
(what `getenv' in Emacs would return) to that value.
That value will affect any new subprocesses that you subsequently start
from Emacs.