From 57cea86f5242f9badc86732bdf22e4b84776ea92 Mon Sep 17 00:00:00 2001 From: hanez Date: Wed, 23 Jul 2025 01:49:04 +0200 Subject: [PATCH] zsh --- .zsh/functions.d/s.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.zsh/functions.d/s.sh b/.zsh/functions.d/s.sh index 14a13030..aeb62923 100644 --- a/.zsh/functions.d/s.sh +++ b/.zsh/functions.d/s.sh @@ -13,11 +13,14 @@ s() { tmux rename-window "${ssh_host%%.*}" # short hostname + # Emit title update BEFORE ssh + printf '\033k%s\033\\' "${ssh_host%%.*}" + # Run SSH session command ssh "$@" - # Restore previous tmux window name - tmux rename-window "$original_name" + # Restore after disconnect + printf '\033k%s\033\\' "$original_name" else command ssh "$@" fi