# Add spawning of tasks without saving them in the task stack \(\#9951\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/cff9ad19f83dc6509124b885a1e1329f104d8ad5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: cff9ad19f83dc6509124b885a1e1329f104d8ad5

Requested commit: cff9ad19f83dc6509124b885a1e1329f104d8ad5

Commit: cff9ad19f83dc6509124b885a1e1329f104d8ad5

Tree: f35f0b7dde822dfeec06c021b988e03238a4705c

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
Add spawning of tasks without saving them in the task stack (#9951)

These tasks are not considered for reruns with `task::Rerun`. 
This PR tears a bunch of stuff up around tasks:
- `menu::SecondaryConfirm` for tasks is gonna spawn a task without
storing it in history instead of being occupied by oneshot tasks. This
is done so that cmd-clicking on the menu item actually does something
meaningful.
- `menu::UseSelectedQuery` got moved into picker, as tasks are it's only
user (and it doesn't really make sense as a menu action).

TODO:
- [x] add release note
- [x] Actually implement the core of this feature, which is spawning a
task without saving it in history, lol.

Fixes #9804 
Release Notes:

- Added "fire-and-forget" task spawning; `menu::SecondaryConfirm` in
tasks modal now spawns a task without registering it as the last spawned
task for the purposes of `task::Rerun`. By default you can spawn a task
in this fashion with cmd+enter or by holding cmd and clicking on a task
entry in a list. Spawning oneshots has been rebound to `option-enter`
(under a `picker::ConfirmInput` name). Fixes #9804 (breaking change)
- Moved `menu::UseSelectedQuery` action to `picker` namespace (breaking
change).
```

## Parents

- [e7bd91c6c78ca95fa932698c6900782c9d41c74d](https://git.cafe/gitcafe/zed/commit/e7bd91c6c78ca95fa932698c6900782c9d41c74d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/cff9ad19f83dc6509124b885a1e1329f104d8ad5?format=markdown)
