File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1265,6 +1265,18 @@ MATCH is optional tag match."
12651265 (kill-new selected)
12661266 (message " \" %s \" => kill-ring" selected))))
12671267
1268+ (defun my-ssh-agency-setup ()
1269+ " Help emacsclient to find ssh-agent setup."
1270+ (when (and (not (getenv " SSH_AGENT_PID" ))
1271+ (file-exists-p " ~/.ssh/environment" ))
1272+ (let* ((str (with-temp-buffer
1273+ (insert-file-contents " ~/.ssh/environment" )
1274+ (buffer-string ))))
1275+ (when (string-match " SSH_AGENT_PID=\\ ([^ ;]+\\ );" str)
1276+ (setenv " SSH_AGENT_PID" (match-string 1 str)))
1277+ (when (string-match " SSH_AUTH_SOCK=\\ ([^ ;]+\\ );" str)
1278+ (setenv " SSH_AUTH_SOCK" (match-string 1 str))))))
1279+
12681280(defun my-generic-prog-mode-hook-setup ()
12691281 " Generic programming mode set up."
12701282 (when (buffer-too-big-p)
You can’t perform that action at this time.
0 commit comments