if command -v tmux /dev/null 2>&1 function ta command tmux list-sessions /dev/null 2>&1 switch $status case '0' tmux a case '*' echo "-- there are no tmux sessions | creating one now.. " sleep 0.7 tmux end end end