From b1b034f6e0905ade22a1ae5935ba346a4eaed648 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 4 Feb 2019 16:26:23 +0100 Subject: [PATCH] Add ssht command to use tmux for ssh sessions --- .zshrc.d/008-ssh-tmux | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .zshrc.d/008-ssh-tmux diff --git a/.zshrc.d/008-ssh-tmux b/.zshrc.d/008-ssh-tmux new file mode 100644 index 0000000..a566aa6 --- /dev/null +++ b/.zshrc.d/008-ssh-tmux @@ -0,0 +1,5 @@ +#automatically use tmux whenever we ssh to a server + +function ssht(){ + ssh $* -t 'tmux a || tmux || /bin/bash' +} \ No newline at end of file