Great, thanks! On Sun, Jun 26, 2022, 09:05 Nicholas Marriott <nicholas.marri...@gmail.com> wrote:
> You can use run -C instead. > > > > On Sat, 25 Jun 2022, 19:37 Michael Forster, <em...@michael-forster.de> > wrote: > >> 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 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "tmux-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to tmux-users+unsubscr...@googlegroups.com. >> To view this discussion on the web, visit >> https://groups.google.com/d/msgid/tmux-users/CAAWozGNUcjPaNPVSMhWxfytdb%2ByGeAw1ER-Y3ek3o9%2B%3D%2BwBRuw%40mail.gmail.com >> <https://groups.google.com/d/msgid/tmux-users/CAAWozGNUcjPaNPVSMhWxfytdb%2ByGeAw1ER-Y3ek3o9%2B%3D%2BwBRuw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAAWozGPygs%3DT2T1PYZQgVFmyGaU1FqUoep9qG869F5XVEJQhNg%40mail.gmail.com.