Greetings!
I am using tmux with zsh.
I use ssh agent forwarding and I ssh to a remote system that is running tmux. I then detach from that terminal and my SSH_AUTH_SOCK environment variable becomes "stale".
I would like to have zsh execute something to refresh the SSH_AUTH_SOCK environment variable when I "tmux attach" to the aforementioned detached tmux session.
Does anyone know of a way to register a callback or something for zsh so when a particular command gets run (in my case, tmux attach) my zsh environment variable can get updated?
Thanks for the help!
-m