Function: projection--env-shell-command-prefix

projection--env-shell-command-prefix is a natively compiled function defined in projection-utils.el.

Signature

(projection--env-shell-command-prefix ENV-ALIST &optional CWD)

Documentation

Construct a shell command prefix for ENV-ALIST and CWD.

If ENV-ALIST and CWD is empty then return nil.

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-utils.el
(defun projection--env-shell-command-prefix (env-alist &optional cwd)
  "Construct a shell command prefix for ENV-ALIST and CWD.
If ENV-ALIST and CWD is empty then return nil."
  (when (or env-alist cwd)
    `("env"
      ,@(when cwd
          (list (concat "--chdir=" cwd)))
      ,@(cl-loop for (key . value) in
                     env-alist
                     collect (concat key "=" value)))))