PLUGIN: gpg-agent: export SSH_* environment variables too
If using the gpg-agent with --enable-ssh-support, the SSH_AUTH_SOCK and
SSH_AGENT_PID environment variables need to be exported once sourced
from GPG_ENV. Otherwise, we get no benefit from the persisting these
values to GPG_ENV; subsequent openned terminals don't see the existent
gpg-agent as a process for an SSH daemon.
Diff
1diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh
2index b6992479d74cc45024a105566c36303902281b3d..3e6a34f425f36d8e8765dde30cc1dc3767020849 100644
3--- a/plugins/gpg-agent/gpg-agent.plugin.zsh
4+++ b/plugins/gpg-agent/gpg-agent.plugin.zsh
5@@ -20,6 +20,8 @@ if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then
6 if [ -f "${GPG_ENV}" ]; then
7 . ${GPG_ENV} > /dev/null
8 export GPG_AGENT_INFO
9+ export SSH_AUTH_SOCK
10+ export SSH_AGENT_PID
11 fi
1213 # check again if another agent is running using the newly sourced settings