# terminal: Use system shell for non-terminal uses \(like spinning up external agents\) \(\#51741\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7db7ea9277e6a2bffa7c7cabc7bf7791012778a7

Requested commit: 7db7ea9277e6a2bffa7c7cabc7bf7791012778a7

Commit: 7db7ea9277e6a2bffa7c7cabc7bf7791012778a7

Tree: c1a92cb2c0f5e4ae1e1da0960b2986918b511d46

Author: Oliver Azevedo Barnes

Committer: GitHub

## Message

```
terminal: Use system shell for non-terminal uses (like spinning up external agents) (#51741)

Closes #46551

Zed was using the `terminal.shell` setting for some actions unrelated to
the terminal GUI, like environment capture, ACP agent startup, context
server startup, and vim `:!`, and so if a user set it to `tmux` or
`nushell`, those paths would fail.

This PR ensures paths unrelated to Zed's terminal use the system path
instead.

Manual testing:

Set `terminal.shell` to `tmux` or any another non-bash executable.

Starting an external agent thread shouldn't break.

Release Notes:

- Fixed ACP agent and other breakage when `terminal.shell` was set to a
non-shell program like `tmux`
```

## Parents

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

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