Hi,
I currently have this line in my tmux config:
run "tmux select-window -t #{@unattached-window}"
It seems unfortunate that I have to execute a shell for a tmux command just so that formats get expanded. Is there a way to expand formats in arbitrary places without using a shell?
For context: This is the whole snippet where I need this:
set-hook -g session-created {
if -F "#{>:#{window_active_sessions},1}" {
set -F @unattached-window "#{s/ .*//:#{W:#{?window_active_sessions,,#{window_id} }}}"
if -F "#{@unattached-window}" {
run "tmux select-window -t #{@unattached-window}"
} new-window
}
}
I would be happy with alternative suggestions on how to achieve my goal of selecting the first window that doesn't have an active session...
Thanks,
Mike