From 6961eb36131a6fde5efc5a52b7d8effe49c2fbf6 Mon Sep 17 00:00:00 2001 From: David Aizenberg Date: Wed, 27 Jul 2022 01:39:17 +0100 Subject: [PATCH] put ssh host as window name in tmux --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 8864008..d082b0d 100644 --- a/.zshrc +++ b/.zshrc @@ -47,7 +47,8 @@ function fzf-ssh () { local selected_host=$(grep "Host " ~/.ssh/config | grep -v '*' | cut -b 6- | fzf --query "$LBUFFER" --prompt="SSH Remote > ") if [ -n "$selected_host" ]; then - BUFFER="ssh ${selected_host}" + tmux rename-window "Remote -- $selected_host" + BUFFER="ssh ${selected_host} ; tmux rename-window dc" zle accept-line fi zle reset-prompt