Skip to content

Commit

Permalink
disable exec-path-from-shell in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Jan 9, 2024
1 parent 0aba69c commit ce199b6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lisp/init-essential.el
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,17 @@ If OTHER-SOURCE is 2, get keyword from `kill-ring'."
(setq show-paren-delay 0.5))

;; {{ Make emacs know ssh-agent
(my-run-with-idle-timer 2
(lambda ()
(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")))
(unless *win64*
;; package exec-path-from-shell uses some Linux only cli tool
(my-run-with-idle-timer 2
(lambda ()
(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"))))

;; }}

Expand Down

0 comments on commit ce199b6

Please sign in to comment.