I worked around this issue by using "list-sessions" to work out if there are any open sessions, then calling the appropriate command:
--------- #!/bin/bash
byobu-tmux list-sessions if [ "$?" -eq 0 ]; then tmuxCmd='att' else tmuxCmd='new' fi byobu-tmux $tmuxCmd ---------
I worked around this issue by using "list-sessions" to work out if there are any open sessions, then calling the appropriate command:
---------
#!/bin/bash
byobu-tmux list-sessions
if [ "$?" -eq 0 ]; then
tmuxCmd='att'
else
tmuxCmd='new'
fi
byobu-tmux $tmuxCmd
---------