zellij: fix stale ssh env, auto tab names, hx scrollback

This commit is contained in:
2026-04-17 16:42:28 +02:00
parent fdeb6d6505
commit 0fe2b5ab9a
3 changed files with 18 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ t() {
tmux new-session -A -s ${1:-tmux}
}
z() {
# if remote, link agent so a stale zellij env doesn't hurt agent
if [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]]; then
ln -sf $SSH_AUTH_SOCK /tmp/agent.sock
export SSH_AUTH_SOCK=/tmp/agent.sock
fi
zellij attach ${1:-$HOST} 2> /dev/null || zellij -s ${1:-$HOST}
}