Tutorial
Navigate & select without the mouse
Once your hands are on the home row, reaching for the trackpad to scroll back, grab a URL, or copy the output of the last command is the slow path. Sinclair lets you do all of it from the keyboard: search the scrollback, jump between prompts, follow links by keystroke, and drive a vi-style cursor to select exactly what you want. This walkthrough runs through each one in the order you'll reach for them.
On macOS, ⌘ is the modifier. On Linux, read ⌘ as ⌃ (Ctrl) throughout. Every shortcut here maps to an action you can remap — see Keybindings.
1. Confirm shell integration is on
Almost everything below leans on one prerequisite, and the good news is you
already have it: shell integration is on by default (the
shell-integration config key). Sinclair injects OSC 133 prompt marks
and OSC 7 working-directory reporting into zsh, bash, and fish purely through
environment variables — it never touches your .zshrc,
.bashrc, or fish config. Those marks are how Sinclair knows where each
command begins and ends, which is what powers jump-to-prompt, command-output
grabbing, and semantic search in the steps that follow.
The integration is transparent and reversible: it's just an environment
injection, so nothing is written to your shell startup files, and setting
shell-integration = false turns it off completely.
2. Search the scrollback
Press ⌘F (toggle_search) to open an in-place search overlay
over the current pane's scrollback. As you type, every match highlights live and
the view scrolls to the nearest hit — you see results before you finish the word.
The query is fully editable: a caret tracks your position and the cursor keys move
through it, so you can refine a search instead of retyping it. Matching is
case-insensitive, and the next/previous controls walk through matches in
order. Press ⎋ to dismiss the overlay
and drop back into the buffer.
3. Search by command, not by line
Sometimes you don't want a raw text match — you want the command that printed
this. ⌘⇧F (toggle_semantic_search) searches a level up:
instead of matching individual lines, it searches across logical prompt/output
blocks, each command you ran and the output it produced. That turns "scroll until I
find it" into a direct hit on the block you're after.
Semantic search relies on knowing where commands begin and end, so it requires shell integration (step 1) to be active.
4. Jump between prompts
A single command can bury the screen in output. Rather than scroll it by hand, jump
straight to the prompt marks: ⌘↑ and ⌘↓
(jump_to_prompt:-1 and jump_to_prompt:1) move the viewport
between shell prompts recorded in the scrollback. It's the fastest way to skip back
over a long block of output to the command that produced it, or forward again to the
latest prompt.
5. Grab a command's output in one keystroke
Because shell integration marks where each command's output begins and ends, Sinclair
treats the space between two prompts as a block. Press
⌘⇧O (copy_command_output) and it copies the output of the
most recent finished command straight to the clipboard — the rows between the two
newest prompt marks, or from the last prompt to the bottom while a command is still
running. No selecting, no scrolling: run a command, then grab exactly what it
printed.
This is the everyday move for pasting a stack trace or a build log into a chat or an issue — you get precisely what the command emitted, with none of the surrounding prompt or your own typing.
6. Follow links by keystroke
When output is full of URLs, hint mode saves you the round trip to the mouse. Press
⌘⇧U (hints) and Sinclair labels every visible URL with a short
home-row keystroke, Vimium-style. Type a label to open that link in your browser —
bare www.… domains get an https:// scheme automatically.
Backspace corrects a mistyped label; ⎋ or any impossible prefix
cancels the whole thing.
7. Select with the keyboard
To copy an arbitrary region — not a whole command's output, but the exact span you
want — use copy mode. ⌘⇧Space (copy_mode) drops a vi-style
cursor onto the viewport and scrollback so you can select without touching the mouse.
Movement follows vi conventions:
- h j k l or the arrow keys — move the cursor (it scrolls the view when it leaves the screen)
- w / b — step a column; 0 / $ — line start / end; g / G — top / bottom
- v — begin a selection; move to extend it
- y or Enter — yank the selection and exit; ⎋ — exit
8. Let smart selection grab whole tokens
When you do click, Sinclair makes each click count. Double-clicking selects the whole
meaningful token under the pointer — a URL, an email address, a filesystem path, or a
git-style hex hash — instead of a single whitespace-delimited word, falling back to
word selection when there's no token there. Triple-click still selects the whole
logical line. It's on by default; set smart-select = false to restore
plain word selection.
9. Search every tab at once
Where ⌘F searches the current pane, ⌘⌥F
(search_all) opens a fuzzy picker over recent output from every
tab. Type to filter across all your sessions at once; each result is labelled with
its tab number, and choosing one focuses that tab. It's the answer to "which window
did I run that in?" — the one keystroke that finds a line no matter where it scrolled
past.