While inside of tmux, I can press PREFIX w
, which runs tmux choose-tree
.
This brings up an interactive session/window/pane selector that also displays a
preview of the highlighted node.
From a normal shell outside of tmux, I can run tmux attach -t '$1:1'
to attach
to any session or window by name or index (see man tmux
section "Clients And
Sessions").
Is there command similar to tmux attach -t
where I can pass in a session/window
name/index and see a preview of it, like to the one used in tmux choose-tree
? Ideally this command would just show the lower portion of this
image:
The goal here is to pipe a list of tmux windows from all sessions to
fzf
, and pass a separate command in fzf
's
--preview
flag to show a preview of the session/window currently highlighted
while fuzzy finding.
I have a draft working here. It populates a preview with the session/window index in a tmux-compliant format and will switch to the selected session.