[Feature Request] Terminal: add inline Clear action to the tab hover actions (next to Split/Kill)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Related: #200510, #130636, #85128, #117663, #30077
Those issues asked for a way to clear a terminal without killing it, and that's now covered by the `Clear Terminal` action in the panel's view-title toolbar (hidden by default, enabled via the `...` menu). That solves "there's no way to clear at all", but it only acts on the terminal that currently has focus, and you have to opt in via the toolbar customization menu to see it at all.
## Feature request
Add a `Clear` icon to the per-terminal hover actions in the terminal tabs list, alongside the existing `Split` and `Kill` icons that already appear when
hovering a terminal's row.
Sample UI:
_Icon/placement here is just illustrative — happy to adjust based on feedback_
This would let you clear any terminal directly from the tabs list — including one that isn't currently focused — without needing to activate it first, open the `...` menu, or remember the keybinding/command palette entry. It mirrors how `Kill` already works per-row today, just non-destructive.
Proposed icon: `$(eraser)`, reusing the existing `workbench.action.terminal.clear` command (`clearBuffer()` on the instance), so behavior is identical for every shell type (cmd, PowerShell, bash, git bash, etc.).
I have a small working patch (~3 files, `terminalTabsList.ts` / `terminalStrings.ts`) and I'm happy to open a PR if this is a direction the team is open to. Would also be fine making it opt-in (e.g. behind a setting or `isHiddenByDefault`-style toggle) to match the precedent set by the toolbar action, if that's preferred over on-by-default.
Contributor guide
Assessment
This issue has not been assessed yet.