Find a window by its content or name
The connection refused window was found by filter, then docs by tree search.
Two ways to find a window you cannot see — by what it shows, or by what it is called:
C-b f- ask for text, then open tree mode showing only panes whose visible content, title or window name matches
C-sin any tree- search names
n- jump to the next match
The filter reads what is on screen now, not the scrollback. When something matches, the line above the preview says filter: active; when nothing does, the full tree shows with filter: no matches.
Press C-b f, type connection refused, Enter.
The tree shows one pane, with filter: active.
The session line is selected, not the match. Press Down to the db row below it, then Enter.
db is current.
Press C-b w, then C-s, type docs, Enter, then Enter again.
The selection jumps to docs, and the second Enter makes it current.
Keys that work in every tree
C-s and n are ordinary tree mode keys, so they work whether or not a filter is on.
Here is what just happened.
C-b f runs find-window, which builds a choose-tree filter from your text. Enter on a row does what it always does in the tree. C-s matched the window name, not its content, which is why it found docs with nothing printed in it.
- Prompt for text and open tree mode filtered to panes whose visible content, title or window name matchesC-bthenf
- Type a name and move to the first matching item in the treeC-s
- Jump to the next matchn
Go further
find-window -rtreats the text as a regular expression;-iignores case;-C,-Nand-Trestrict the match to content, name or title.findw docsat the prompt is the same asC-b fthendocs.
- 1Wait for the prompt to appear before typing; text typed early goes to the shell.
- 2
C-b f, typeconnection refused, Enter. ThenDownonto the matching row and Enter again. - 3
C-b w, thenC-s, typedocs, Enter to jump, Enter to select.
This is a live terminal. Typing goes to the machine, including Tab. Press Shift and Tab together to move focus back out to the page.
A real terminal, in this tab
Alpine Linux and tmux 3.4 on an x86 emulator. Nothing to install, and no server behind it.
about 15 MB, once
Done when
not started- The current pane is showing the find-window filter in tree mode— not done yet
- Window 4 (db, the one that printed connection refused) is current— not done yet
- Window docs is current, found by name from tree mode— not done yet