learntmux.dev

Choose and delete buffers in buffer mode

Goal

host=db-1.internal is pasted at the prompt and buffer stale is deleted.

C-b ] only ever pastes the newest buffer. Buffer mode is how you reach any of the others:

C-b =
open it; every buffer, newest first, with a preview
Up / Down
move
Enter or p
paste the selected buffer
d
delete it
q
leave

Two kinds of buffer sit in that list. Automatic buffers are the ones copy mode makes — buffer0, buffer1 — and the oldest drops off past 50. A named buffer, made with set-buffer -b name, never ages out, so a stale one stays in your list until you delete it by hand.

Do this

Press C-b =.

The newest buffer, host=web-3.internal, is at the top.

Press Down to select host=db-1.internal, then Enter.

It appears at the shell prompt, not run.

Press C-b = again, move to stale, press d, then q.

It vanishes from the list.

The buffer-mode keys

Buffer mode uses the same keys as tree mode: t tags, and D deletes the tagged buffers the way X kills tagged windows there.

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 older host=db-1.internal buffer was pasted into the shell pane— not done yet
  2. No buffer named stale remains on the server— not done yet