cli/env: fix doom-env-ignored-vars not being ignored
And add HOME to ignored vars.
This commit is contained in:
parent
a0d94e0db7
commit
24506f15bf
1 changed files with 10 additions and 10 deletions
|
@ -57,20 +57,20 @@ Why this over exec-path-from-shell?
|
||||||
;; Helpers
|
;; Helpers
|
||||||
|
|
||||||
(defvar doom-env-ignored-vars
|
(defvar doom-env-ignored-vars
|
||||||
'("^PWD$"
|
'("^DBUS_SESSION_BUS_ADDRESS$"
|
||||||
"^PS1$"
|
|
||||||
"^R?PROMPT$"
|
|
||||||
"^DBUS_SESSION_BUS_ADDRESS$"
|
|
||||||
"^GPG_AGENT_INFO$"
|
"^GPG_AGENT_INFO$"
|
||||||
"^GPG_TTY$"
|
"^GPG_TTY$"
|
||||||
"^TERM$"
|
"^HOME$"
|
||||||
|
"^PS1$"
|
||||||
|
"^PWD$"
|
||||||
|
"^R?PROMPT$"
|
||||||
"^SSH_AGENT_PID$"
|
"^SSH_AGENT_PID$"
|
||||||
"^SSH_AUTH_SOCK$"
|
"^SSH_AUTH_SOCK$"
|
||||||
;; Doom envvars
|
|
||||||
"^INSECURE$"
|
|
||||||
"^DEBUG$"
|
|
||||||
"^YES$"
|
|
||||||
"^TERM$"
|
"^TERM$"
|
||||||
|
;; Doom envvars
|
||||||
|
"^DEBUG$"
|
||||||
|
"^INSECURE$"
|
||||||
|
"^YES$"
|
||||||
"^__")
|
"^__")
|
||||||
"Environment variables to not save in `doom-env-file'.
|
"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
|
;; user's interactive shell, therefore we just dump
|
||||||
;; `process-environment' to a file.
|
;; `process-environment' to a file.
|
||||||
(dolist (env process-environment)
|
(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)
|
doom-env-ignored-vars)
|
||||||
(print! (info "Ignoring %s") env)
|
(print! (info "Ignoring %s") env)
|
||||||
(insert env "\n")))
|
(insert env "\n")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue