zsh
This commit is contained in:
parent
4dbf1a4bfd
commit
57cea86f52
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue