From 431e7edd54f7d12a93e11036024265cdf41c9b69 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 10 Oct 2025 07:40:53 +0100 Subject: [PATCH] zsh: update SSH_AUTH_SOCK whithin zellij This allows ssh agent forwarding to keep working after each ssh reconnect. --- zsh/lib/zellij.zsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 zsh/lib/zellij.zsh 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 -- 2.50.1