zsh
This commit is contained in:
parent
675bd7c857
commit
331f498456
1 changed files with 5 additions and 4 deletions
|
|
@ -13,14 +13,14 @@ s() {
|
||||||
|
|
||||||
tmux rename-window "${ssh_host%%.*}" # short hostname
|
tmux rename-window "${ssh_host%%.*}" # short hostname
|
||||||
|
|
||||||
# Emit title update BEFORE ssh
|
# Emit title update BEFORE ssh
|
||||||
printf '\033k%s\033\\' "${ssh_host%%.*}"
|
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
|
||||||
|
|
@ -41,7 +41,8 @@ sshr() {
|
||||||
|
|
||||||
command ssh "$@"
|
command ssh "$@"
|
||||||
|
|
||||||
|
# Restore after disconnect
|
||||||
|
printf '\033k%s\033\\' "$original_name"
|
||||||
else
|
else
|
||||||
command ssh "$@"
|
command ssh "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue