Function: exec-path-from-shell-setenv

exec-path-from-shell-setenv is a natively compiled function defined in exec-path-from-shell.el.

Signature

(exec-path-from-shell-setenv NAME VALUE)

Documentation

Set the value of environment var NAME to VALUE.

Additionally, if NAME is "PATH" then also update the variables exec-path(var)/exec-path(fun) and eshell-path-env.

Source Code

;; Defined in /nix/store/a3f7aq5s6rdw5arrqvyppbs5jfrlsxa3-emacs-packages-deps/share/emacs/site-lisp/elpa/exec-path-from-shell-20260423.1833/exec-path-from-shell.el
(defun exec-path-from-shell-setenv (name value)
  "Set the value of environment var NAME to VALUE.
Additionally, if NAME is \"PATH\" then also update the
variables `exec-path' and `eshell-path-env'."
  (setenv name value)
  (when (string-equal "PATH" name)
    (setq exec-path (append (parse-colon-path value) (list exec-directory)))
    ;; `eshell-path-env' is a buffer local variable, so change its default
    ;; value.
    (setq-default eshell-path-env value)))