zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.23k stars 2.86k forks source link

Kill previous task #10841

Open Gioppix opened 5 months ago

Gioppix commented 5 months ago

Check for existing issues

Describe the feature

"allow_concurrent_runs" should provide the possibility to kill the previous task, instead of just opening a new one or waiting. This is very useful for programs that continuously run (e.g. asking for user input). As of now the only solution I found is manually terminating a run to allow for the new one in the queue to execute.

If applicable, add mockups / screenshots to help present your vision of the feature

"allow_concurrent_runs": "allow_multiple" | "wait" | "terminate"

SomeoneToIgnore commented 5 months ago

Such behavior is available, but might not be obvious enough:

"allow_concurrent_runs": true,
"use_new_terminal": false

This combination will allow not to wait for previous tasks before spawning the new one, but forced to reuse the terminal of the previous task, which should result in the previous terminal (and the task running in it) being killed, and the new task instantly started.

Gioppix commented 5 months ago

@SomeoneToIgnore yeah "concurrent" seems very different from killing the previous task. Thanks tho it works great!