Add tmls script

This commit is contained in:
Rob Watson 2021-05-17 12:41:36 +02:00
parent a8a5f31903
commit e777df2a3a
1 changed files with 14 additions and 0 deletions

14
script/tmls Executable file
View File

@ -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"