Created
May 12, 2022 09:41
-
-
Save itatabitovski/40bba020f71cb4bde250d4cf23bb7cdb to your computer and use it in GitHub Desktop.
tmux rename window to ssh hostname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh() { | |
if $(env | grep -q "TMUX_PANE"); then | |
tmux rename-window "$*" | |
command ssh "$@" | |
tmux set-window-option automatic-rename "on" 1>/dev/null | |
else | |
command ssh "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment