#!/bin/bash EXISTS=false tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true $EXISTS && tmux a -t "$1" $EXISTS || tmux new -s "$1"