[zsh] renames tmux window during ssh

This commit is contained in:
Josh Sherman 2016-11-23 14:03:31 -06:00
parent 53e6e6d9bd
commit ab2c63934e

View file

@ -74,3 +74,13 @@ man() {
LESS_TERMCAP_us=$'\e[1;32m' \ LESS_TERMCAP_us=$'\e[1;32m' \
man "$@" man "$@"
} }
ssh() {
if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then
tmux rename-window "$*"
command ssh "$@"
tmux set-window-option automatic-rename "on" 1>/dev/null
else
command ssh "$@"
fi
}