From e777df2a3a59a7cee2f033bd2c6d9078cc714e85 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Mon, 17 May 2021 12:41:36 +0200 Subject: [PATCH] Add tmls script --- script/tmls | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 script/tmls diff --git a/script/tmls b/script/tmls new file mode 100755 index 0000000..6d38194 --- /dev/null +++ b/script/tmls @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# tmls - select a tmux session and switch to it + +set -e + +line="$(tmux list-sessions | fzf)" +if [ -z "$line" ]; then + exit 0 +fi + +sessionname=$(echo "$line" | awk -F ":" '{print $1}') + +tmux switch -t "$sessionname"