From 53db978a6f12dd773e6adc5590d4f1645b8375a1 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 9 Nov 2021 11:32:43 +0100 Subject: [PATCH] bash: ssh verbessert --- .bash_functions | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.bash_functions b/.bash_functions index d81e5c7..aa2d2eb 100644 --- a/.bash_functions +++ b/.bash_functions @@ -1,9 +1,5 @@ rg --files -g "*$1*" } -ssh() { #() ist die kurzform von function - tmux rename-window "$*" - command ssh "$@" -} function sgc { @@ -86,4 +82,13 @@ function rgi { fi fi } +function ssh { + # benennt das aktuelle tmux-windows nach dem ssh-ziel + # baut ssh-verbindung auf + if [ -n "${TMUX}" ]; then + tmux rename-window "$*" + fi + command ssh "$@" +} +