From ddd22fc5e471c7f28a4252caea7ea9e004d3bdf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 3 Aug 2016 23:09:53 +0200 Subject: [PATCH] Do not hardcode SSH agent socket path. --- zsh/zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/zprofile b/zsh/zprofile index 1021280..a9af91c 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -42,7 +42,7 @@ fi # Set SSH to use gpg-agent unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" fi # Set GPG TTY