This commit is contained in:
Johannes Findeisen 2025-07-23 01:49:04 +02:00
commit 57cea86f52

View file

@ -13,11 +13,14 @@ s() {
tmux rename-window "${ssh_host%%.*}" # short hostname tmux rename-window "${ssh_host%%.*}" # short hostname
# Emit title update BEFORE ssh
printf '\033k%s\033\\' "${ssh_host%%.*}"
# Run SSH session # Run SSH session
command ssh "$@" command ssh "$@"
# Restore previous tmux window name # Restore after disconnect
tmux rename-window "$original_name" printf '\033k%s\033\\' "$original_name"
else else
command ssh "$@" command ssh "$@"
fi fi