Filtering output
Live-filter a block's output, with regex and case-sensitive modes.
To find text in a command's output in Mel, open the block's filter bar: it narrows that block to the lines that match, highlights the match, and counts the hits. Every block has its own filter bar, and it is Mel's find-in-output: the quickest way to read a test run, a build log or tail -f.
Opening the filter
Select a block and click the 🔽 icon in its header, or pick Toggle block filter from the right-click menu. The filter bar docks under the block's header. Filters are per-block: each block remembers its own filter independently, and the bar stays open until you close it.
Keyboard shortcuts
| Action | Windows and Linux | Mac |
|---|---|---|
| Find in the selected block (open or close its filter) | Find in Selected Block has no key by default; set one in Settings ▸ Keyboard shortcuts | same |
| Search files in the project | Ctrl+Shift+F | ⌘⇧F |
| Search command history | Ctrl+R | ⌘R |
Using it
- Query field — type and the output narrows immediately to lines containing your text. A live match count shows how many lines matched.
- ✕ — clears the query.
- **
.*** — regex mode. Your query is compiled as a regular expression; matching lines are kept. Aa— case-sensitive matching. Both toggles highlight in the accent color when active.
While the filter has a non-empty query, matched substrings inside the surviving lines are highlighted, so you can spot the hit inside a long line at a glance.
# e.g. filter a test run down to failures
cargo test
# open the filter, type: FAILED
# or regex mode: error(\[E\d+\])?Works on streaming output
The filter is re-evaluated every frame, so it works on running blocks too. Open a filter on a tail -f or a long-running build and new lines are filtered as they stream in — you effectively get a live grep over any command without restarting it.
Filtering vs. searching
- The block filter searches one block's output and hides non-matching lines.
- Global search (Ctrl+Shift+F, or ⌘⇧F on a Mac) searches files in your project via ripgrep. See the command palette for how to reach it.
FAQ
How do I search terminal output? Select the block and open its filter (the 🔽 icon, or Toggle block filter in the right-click menu), then type. Only matching lines stay, with the match highlighted.
Can I search all blocks at once? Not in one bar: each block has its own filter. To search files, use global search (Ctrl+Shift+F).
Does it work while a command is still running? Yes. New lines are filtered as they arrive.
Related
- Block actions — all header icons and menu items
- Blocks — block anatomy and limits