From 24506f15bfd4966ae7d03bd6070c777fdee418e3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 16:24:02 -0500 Subject: [PATCH] cli/env: fix doom-env-ignored-vars not being ignored And add HOME to ignored vars. --- core/cli/env.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index 3cbef1b35..9b28a6804 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -57,20 +57,20 @@ Why this over exec-path-from-shell? ;; Helpers (defvar doom-env-ignored-vars - '("^PWD$" - "^PS1$" - "^R?PROMPT$" - "^DBUS_SESSION_BUS_ADDRESS$" + '("^DBUS_SESSION_BUS_ADDRESS$" "^GPG_AGENT_INFO$" "^GPG_TTY$" - "^TERM$" + "^HOME$" + "^PS1$" + "^PWD$" + "^R?PROMPT$" "^SSH_AGENT_PID$" "^SSH_AUTH_SOCK$" - ;; Doom envvars - "^INSECURE$" - "^DEBUG$" - "^YES$" "^TERM$" + ;; Doom envvars + "^DEBUG$" + "^INSECURE$" + "^YES$" "^__") "Environment variables to not save in `doom-env-file'. @@ -122,7 +122,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in ;; user's interactive shell, therefore we just dump ;; `process-environment' to a file. (dolist (env process-environment) - (if (cl-find-if (doom-rpartial #'string-match-p env) + (if (cl-find-if (doom-rpartial #'string-match-p (car (split-string env "="))) doom-env-ignored-vars) (print! (info "Ignoring %s") env) (insert env "\n")))