From 94f0af366a70ae9055d927b88554951b95a1c61f Mon Sep 17 00:00:00 2001 From: Eragos Date: Sun, 10 Jul 2016 14:24:41 +0200 Subject: [PATCH] add ssht function will attach to existing tmux session, create new if one does not exist or just start bash if there is no tmux available. --- functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions b/functions index 39373ae..5796d0d 100644 --- a/functions +++ b/functions @@ -9,6 +9,11 @@ udot() { cd $cwd } +# will attach to existing tmux session, create new if one does not exist or just start bash if there is no tmux available. +function ssht(){ + ssh $* -t 'tmux a || tmux || /bin/bash' +} + #Docker: bash into running Docker container dockersh() { docker cp ~/.dotfiles/docker.bashrc $1:/.docker.bashrc