Capture the visible content of a single tmux pane as plain text.
target is the session:window.pane form. ANSI escapes are stripped
by tmux (no -e), which is what we want for pattern matching.
Switch the current client to a specific pane (session:window.pane).
switch-client -t session:window.pane is unreliable across tmux versions
for selecting the window/pane within the session, so we do the dance
explicitly: select-pane first (which carries window selection), then
switch the client. All errors are surfaced.