dotfiles/script/tmls

15 lines
236 B
Plaintext
Raw Normal View History

2021-05-17 10:41:36 +00:00
#!/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"