summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2021-07-15 22:32:40 -0700
committerMatt Turner <mattst88@gmail.com>2021-07-15 22:32:40 -0700
commit27abb0988e4c64628d6dcd13463835ba838acaa4 (patch)
treef44d69cd21b8770de1314531be7bfc585e229569
parent27217c2b8f873280a55bafd78830f7ff3c8ad0d7 (diff)
.zshrc: Update SSH_AUTH_SOCK handling
-rw-r--r--.zshrc7
1 files changed, 3 insertions, 4 deletions
diff --git a/.zshrc b/.zshrc
index 8e91869..ca69823 100644
--- a/.zshrc
+++ b/.zshrc
@@ -45,10 +45,9 @@ bindkey "\e[3~" delete-char
export PATH=:$PATH:~/bin
-if [ -f "${HOME}/.gpg-agent-info" ]; then
- . "${HOME}/.gpg-agent-info"
- export GPG_AGENT_INFO
- export SSH_AUTH_SOCK
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)