0

I am trying to link a window from another session by specifying target session using format variable. In that way I hope to get it always linked next to the current active window.

The hard coded version of the working command:

:link-window -a -s 1:remote -t 0:2

in which case I specify a target pane literaly. When I try any of:

:link-window -a -s 1:remote -F -t "#{session_name}":"#{window_index}"
:link-window -a -s 1:remote -F "#{session_name}":"#{window_index}"
:link-window -a -s 1:remote -t "#{session_name}":"#{window_index}"

I got an error. The notable part here is that when I do use -F flag, the usage for link-window command is displayed. And when I omit it and use only -t, the error is cann't find window #{session_name}

Does it mean that link-window command simply doesn't support format variables?

l00p
  • 392
  • 2
  • 17

1 Answers1

1

-t does not support format variables and link-window does not support -F. run-shell will expand so you can do it by doing, for example:

run "tmux linkw -t '#{session_name}'"
Nicholas Marriott
  • 3,148
  • 9
  • 12