if command -v tmux 2>&1 function ta command tmux list-sessions 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