Skip to content

Commit

Permalink
setup exec-path-from-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed May 18, 2024
1 parent 744634e commit f998744
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lisp/init-essential.el
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,12 @@ If OTHER-SOURCE is 2, get keyword from `kill-ring'."
;; package exec-path-from-shell uses some Linux only cli tool
(my-run-with-idle-timer 2
(lambda ()
(my-ensure 'exec-path-from-shell)
(setq exec-path-from-shell-check-startup-files nil)
;; @see https://github.com/purcell/exec-path-from-shell/issues/75
(exec-path-from-shell-initialize)
;; @see https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password
(exec-path-from-shell-copy-env "SSH_AGENT_PID")
(exec-path-from-shell-copy-env "SSH_AUTH_SOCK")
(exec-path-from-shell-copy-env "GPG_AGENT_INFO"))))
(setq exec-path-from-shell-arguments nil)
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG" "LC_CTYPE" "NIX_SSL_CERT_FILE" "NIX_PATH"))
(add-to-list 'exec-path-from-shell-variables var))
(exec-path-from-shell-initialize))))

;; }}

Expand Down

0 comments on commit f998744

Please sign in to comment.