diff --git a/modules/home/users/msyds/emacs/lisp/syd/prelude.el b/modules/home/users/msyds/emacs/lisp/syd/prelude.el index ac832d4..22a1881 100755 --- a/modules/home/users/msyds/emacs/lisp/syd/prelude.el +++ b/modules/home/users/msyds/emacs/lisp/syd/prelude.el @@ -249,19 +249,21 @@ form." (defun syd-import-systemd-environment () (interactive) - (with-temp-buffer - (shell-command "systemctl --user show-environment" (current-buffer)) - (goto-char (point-min)) - (while (re-search-forward - (rx bol (group (+ (not "="))) - "=" - (or (and "$'" (group (* (not "'"))) "'") - (group (* any))) - eol) - nil t) - (let ((var (match-string 1)) - (val (or (match-string 2) - (match-string 3)))) - (setenv var val))))) + (let ((blacklist '("TERM"))) + (with-temp-buffer + (shell-command "systemctl --user show-environment" (current-buffer)) + (goto-char (point-min)) + (while (re-search-forward + (rx bol (group (+ (not "="))) + "=" + (or (and "$'" (group (* (not "'"))) "'") + (group (* any))) + eol) + nil t) + (let ((var (match-string 1)) + (val (or (match-string 2) + (match-string 3)))) + (unless (member var blacklist) + (setenv var val))))))) (provide 'syd/prelude)