dotfiles/bin/ssh

18 lines
295 B
Plaintext
Raw Normal View History

2021-07-01 22:51:14 +00:00
#!/bin/bash
#if test -n "$TMUX"
#tmux rename-window $argv[-1]
#/bin/ssh $argv
#
#end
tmux_auto_rename() {
tmux setw automatic-rename
}
[ -n "$TMUX" ] && trap tmux_auto_rename INT
[ -n "$TMUX" ] && tmux rename-window "${@:-1}"
/bin/ssh "$@"
[ -n "$TMUX" ] && tmux_auto_rename