formats and filters question

22 views
Skip to first unread message

M Kelly

unread,
Oct 8, 2020, 10:53:36 AM10/8/20
to tmux-users
Hi everyone,

I am trying to get a list of all panes with the same window index:

tmux list-panes -s -F '#{window_index} #{s/%//:pane_index}: #{pane_title} #{b:pane_start_command}' -f '?#{==:#{window_index},#I}'

But my filter does not seem to work right.
I know I can just remove the -s in this case, but in general I am trying to figure out filters.
Does anyone know if there a way to put in the current window index to use in the filter compare ?

thanks for all things tmux,
-m

M Kelly

unread,
Oct 8, 2020, 11:55:09 AM10/8/20
to tmux-users
Hi,

I think I just need to get my current window_index separately, before-hand, and use that as a constant in the filter instead of #I.

thx,
-m

Nicholas Marriott

unread,
Oct 8, 2020, 11:57:45 AM10/8/20
to M Kelly, tmux-users
You can wrap the whole thing in run-shell which will expand formats, so let it expand the current window and escape the others so list-panes expands them, something like

run 'tmux lsp -f '##{==:#{window_index},##{window_index}}'





--
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+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/6b9d0e88-b268-46b2-a461-6323305401a7n%40googlegroups.com.

M Kelly

unread,
Oct 8, 2020, 12:01:38 PM10/8/20
to tmux-users
HI,

ok, awesome.
Thanks so much Nicholas.

-m

Reply all
Reply to author
Forward
0 new messages