diff --git a/.zshenv b/.zshenv index c88f0c6..f4785c2 100644 --- a/.zshenv +++ b/.zshenv @@ -36,3 +36,9 @@ if [[ ! -d "$TMPPREFIX" ]] then mkdir -p "$TMPPREFIX" fi + +# Set SSH auth socket +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi