learntmux.dev

Find a window by its content or name

Goal

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-s in 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.

Do this

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.

Stuck on this one?

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

about 15 MB, once

session learn

Done when

not started
  1. The current pane is showing the find-window filter in tree mode— not done yet
  2. Window 4 (db, the one that printed connection refused) is current— not done yet
  3. Window docs is current, found by name from tree mode— not done yet