]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: update SSH_AUTH_SOCK location when running zellij
authorSamir Benmendil <me@rmz.io>
Thu, 30 Oct 2025 00:31:51 +0000 (00:31 +0000)
committerSamir Benmendil <me@rmz.io>
Thu, 30 Oct 2025 00:31:51 +0000 (00:31 +0000)
Seems that newer version of ssh/sshd now forward the path into the home
directory.

zsh/lib/zellij.zsh

index a30b79942bd9a1440130220a421e77f1cc5be686..18ffe732608acef2a1a55bc34d7511da8a372eda 100644 (file)
@@ -1,7 +1,7 @@
 if [[ -n "$ZELLIJ" ]]; then
     function update-env {
         # set SSH_AUTH_SOCK to latest socket
 if [[ -n "$ZELLIJ" ]]; then
     function update-env {
         # set SSH_AUTH_SOCK to latest socket
-        export SSH_AUTH_SOCK=$(realpath /tmp/ssh-XXXX*/*(om[1]))
+        export SSH_AUTH_SOCK=$(realpath ~/.ssh/agent/s.*(om[1]))
     }
     preexec_functions+=(update-env)
 fi
     }
     preexec_functions+=(update-env)
 fi