set tmux-environment also

This commit is contained in:
Jakobus Schürz 2023-08-09 10:47:56 +02:00
parent e5350dc312
commit 0f9fb26c1e

View file

@ -959,16 +959,15 @@ loadagent() {
[ -n "${af:+x}" ] && eval $(<$af) [ -n "${af:+x}" ] && eval $(<$af)
if which tmux 1>/dev/null 2>&1 if which tmux 1>/dev/null 2>&1
then then
[ -n "${SSH_AUTH_SOCK:-}" ] && tmux set-environment SSH_AUTH_SOCK $SSH_AUTH_SOCK [ -n "${SSH_AUTH_SOCK:-}" ] && tmux set-environment SSH_AUTH_SOCK $SSH_AUTH_SOCK || tmux set-environment -r SSH_AUTH_SOCK
[ -n "${SSH_AGENT_PID:-}" ] && tmux set-environment SSH_AGENT_PID $SSH_AGENT_PID [ -n "${SSH_AGENT_PID:-}" ] && tmux set-environment SSH_AGENT_PID $SSH_AGENT_PID || tmux set-environment -r SSH_AGENT_PID
[ -n "${PKCS11_MODULE:-}" ] && tmux set-environment PKCS11_MODULE $PKCS11_MODULE [ -n "${PKCS11_MODULE:-}" ] && tmux set-environment PKCS11_MODULE $PKCS11_MODULE || tmux set-environment -r PKCS11_MODULE
fi fi
logdebug "SSH_AUTH_SOCK: ${SSH_AUTH_SOCK-not set}" logdebug "SSH_AUTH_SOCK: ${SSH_AUTH_SOCK-not set}"
logdebug "SSH_AGENT_PID: ${SSH_AGENT_PID-not set}" logdebug "SSH_AGENT_PID: ${SSH_AGENT_PID-not set}"
logdebug "PCKS11_MODULE: ${PCKS11_MODULE-not set}" logdebug "PCKS11_MODULE: ${PCKS11_MODULE-not set}"
loginfo "currently loaded keys in agent: loginfo "currently loaded keys in agent:
$(ssh-add -l)" $(ssh-add -l)"
# export P11M=$PKCS11_MODULE
EXIT EXIT
} }