> ## Documentation Index
> Fetch the complete documentation index at: https://tty7.io/llms.txt
> Use this file to discover all available pages before exploring further.

# History

> Fuzzy history search, and whether each pane gets its own.

## Fuzzy search with <kbd>⌃ R</kbd>

<kbd>⌃ R</kbd> opens a fuzzy search over what you have actually run. Type any
fragment — the letters do not have to be adjacent — and the list narrows.

Each row carries context the plain shell version throws away:

* **when** you last ran it, as a relative time
* **whether it failed**, from the exit code

A command appears once, however many times you have run it — repeats collapse
into their most recent occurrence. Ranking mixes frequency with recency, and
commands you ran in the *current* directory are pushed up, so the thing you want
is usually the thing you last did here.

<Frame caption="Placeholder — screenshot: ⌃R open, matching rows showing relative time and a failed exit">
  <img src="https://mintcdn.com/tty7/xi044v9ExFWIUIoQ/images/placeholder.svg?fit=max&auto=format&n=xi044v9ExFWIUIoQ&q=85&s=631190f8b3c3fc2a1846976059902298" alt="Fuzzy history search" width="1200" height="675" data-path="images/placeholder.svg" />
</Frame>

<kbd>⏎</kbd> puts the command on the prompt. <kbd>⌘ ⏎</kbd> puts it there and
runs it. <kbd>Esc</kbd> closes without touching it.

### Handing <kbd>⌃ R</kbd> back

If you already have an fzf, percol, atuin or McFly binding you like, turn off
**Settings → Input → Prompt → History search** (`history_search: false`).
<kbd>⌃ R</kbd> then goes to the shell, and whatever you bound there keeps
working.

That releases <kbd>⌃ R</kbd> and nothing else — <kbd>↑</kbd> still walks tty7's
own history list. To give the shell the whole prompt, including <kbd>↑</kbd> and
whatever widget you bound to it, turn off
[the prompt editor](/terminal/prompt#giving-the-whole-prompt-back-to-the-shell)
(`prompt_editor: false`).

## Where the history comes from

Your existing shell history file, as-is. Nothing is imported or converted, and a
history written outside tty7 shows up immediately.

The per-row extras — when you last ran it, whether it failed — come from a small
file tty7 keeps alongside it, filled in as you run things. A command tty7 has
never seen still appears; it just arrives without a timestamp or an exit code.

## One history, or one per pane

By default every pane shares your shell's history file, which is what a terminal
has always done: a command typed in one pane is available in the next.

**Settings → Input → Prompt → Give each pane its own shell history**
(`per_pane_history: true`) changes that. Each pane gets a private history file:

* **seeded** from your real history when the pane opens, so it is not blank
* **merged back** into your real history when the pane closes, so nothing typed
  is lost

Useful when several agents or several tasks are running side by side and you do
not want their commands interleaved in your <kbd>↑</kbd> key. Off by default,
because someone who has not asked for it would experience the change as their
history mysteriously forgetting the other window.
