From: Samir Benmendil Date: Fri, 10 Oct 2025 06:40:53 +0000 (+0100) Subject: zsh: update SSH_AUTH_SOCK whithin zellij X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/431e7edd54f7d12a93e11036024265cdf41c9b69?ds=sidebyside zsh: update SSH_AUTH_SOCK whithin zellij This allows ssh agent forwarding to keep working after each ssh reconnect. --- diff --git a/zsh/lib/zellij.zsh b/zsh/lib/zellij.zsh new file mode 100644 index 0000000..a30b799 --- /dev/null +++ b/zsh/lib/zellij.zsh @@ -0,0 +1,7 @@ +if [[ -n "$ZELLIJ" ]]; then + function update-env { + # set SSH_AUTH_SOCK to latest socket + export SSH_AUTH_SOCK=$(realpath /tmp/ssh-XXXX*/*(om[1])) + } + preexec_functions+=(update-env) +fi