I am trying to write scripts to do, among other things, if I am already attached to a name tmux session, switch to a tab where it is active.
I can iterate through the current tmux sessions with:
tmux_connections = await iterm2.tmux.async_get_tmux_connections(connection)
for connection in tmux_connections:
...
However, when I find the tmux session I want, when I iterate through all of the windows and a tabs, none of the tabs have a tmux_connection_id set, so I am unsure of how to match the tab.
The code I am attempting to do this with can be found in this gist:
Is there a way to do what I want?