Skip to content

Add interactive kill-all process groups#90

Open
Kabi10 wants to merge 1 commit intosindresorhus:mainfrom
Kabi10:feat/group-process-kill-all
Open

Add interactive kill-all process groups#90
Kabi10 wants to merge 1 commit intosindresorhus:mainfrom
Kabi10:feat/group-process-kill-all

Conversation

@Kabi10
Copy link
Copy Markdown

@Kabi10 Kabi10 commented May 5, 2026

This adds a kill-all option for same-name processes in interactive mode.

What changed:

  • Groups same-name processes in the interactive search results.
  • Shows a clear "Kill all N process-name processes" entry for duplicate process names.
  • Selecting that group passes all matching PIDs through the existing kill sequence.
  • Adds a focused AVA test for grouped process choices.

This addresses the interactive kill-all use case from #21 and also helps with the same-name process grouping discussed in #6.

Verification:

  • npm test

Closes #21

@sindresorhus
Copy link
Copy Markdown
Owner

I think the best path here is to keep the interactive list flat and preserve the current default behavior.

Please keep the individual process rows as selectable entries, then add one extra explicit row for duplicate names, for example Kill all 3 node processes. I’d put that row after the individual entries for that name. Selecting a normal row should still kill only that PID, and selecting the kill all row can pass the PID array through the existing kill sequence.

That keeps the feature discoverable without making Enter on a normal looking search result suddenly kill multiple processes. It also avoids submenu or modifier key complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kill all

2 participants