Command history
The Up-arrow history picker: session commands, shell history, and past prompts.
To search your command history in Mel, press Ctrl+R (⌘R on a Mac) or up-arrow at an empty prompt: both open the HISTORY picker — an overlay of everything you've run and everything you've asked, instead of blindly cycling one command at a time.
Opening and navigating
- Up-arrow opens the picker anchored above the prompt, with the newest entry selected.
- Up/down move through rows. Pressing down past the newest entry closes the picker and returns you to the input.
- Enter (or a click) drops the chosen row into the input — it doesn't run it, so you can edit first.
- shift+tab cycles the tabs; esc dismisses.
The same picker works inside agent conversations, so your history follows you between modes.
The three tabs
| Tab | Shows |
|---|---|
| All | Commands and prompts interleaved, oldest to newest |
| Commands | Shell commands only |
| Prompts | Agent prompts only |
Each row shows a type glyph (a >_ for commands, a chat bubble for prompts), the text on one line, and a relative age on the right when the time is known.
The preview pane
On the Prompts tab, a preview pane opens under the list showing the full, multi-line text of the selected prompt — useful because agent prompts are often paragraphs, not one-liners. The preview scrolls independently.
Where entries come from
The picker merges several sources, deduplicated within each kind:
- This session's commands — from the pane's block list, with real timestamps (up to 40).
- Shell history — your
~/.zsh_historyor~/.bash_history(the most recent 50), so history from before Mel is right there. These predate Mel's timestamps, so they sort oldest and show no age. - This session's prompts plus prompts from recently saved conversations (the most recent 20) under
~/.local/share/mel/accounts/<account>/conversations/(one history per account).
Everything sorts oldest → newest, so the most recent activity is always at the bottom next to your prompt.
Command search (Ctrl+R)
Ctrl+R (⌘R on a Mac) opens this same picker. It is the Command Search action in Settings → Keyboard shortcuts, where you can give it another key. It works while the pane is showing blocks, not a conversation or a running program.
Keyboard shortcuts
| Action | Windows and Linux | Mac |
|---|---|---|
| Open the history picker | Ctrl+R, or ↑ at an empty prompt | ⌘R, or ↑ at an empty prompt |
| Move through rows | ↑ / ↓ | ↑ / ↓ |
| Put the row in the input (without running it) | Enter | ↵ |
| Switch between All, Commands and Prompts | Shift+Tab | ⇧⇥ |
| Close | Esc | Esc |
History picker vs. ghost autocomplete
The picker is for browsing; the ghost autocomplete is for speed — as you type, Mel suggests the completion inline and → accepts it. They share the same underlying history sources.
FAQ
How do I search my terminal history? Press Ctrl+R (⌘R on a Mac). Pick a row and press Enter to put it in the input, then edit or run it.
Does Mel see the history from my old terminal? Yes. It reads your ~/.zsh_history or ~/.bash_history.
Can I find an old agent prompt here? Yes, on the Prompts tab, with a preview of the full text.
Related
- Input and the prompt — the
/conversationspicker for resuming whole conversations - Sessions