if command -v tmux 2>&1 function ta command tmux list-sessions 2>&1 switch $status case '0' tmux a case '*' tmux end end end