From 1b35be5a589cc245d132f56183cba661456a8349 Mon Sep 17 00:00:00 2001 From: Kevin Rambaud Date: Fri, 10 Oct 2025 18:21:48 +0200 Subject: [PATCH] Fix redirect stdin command for fish shell (#39963) This fixes an issue introduced via [v0.208.0-pre](https://github.com/zed-industries/zed/releases/tag/v0.208.0-pre) and reported via https://github.com/zed-industries/zed/issues/34530#issuecomment-3386042577 where, when using fish shell as the default shell and using a Claude Code thread in Zed, all command were failing because `(command)` in fish is for command substitution. Using it creates this type of error: ``` fish: command substitutions not allowed in command position. Try var=(your-cmd) $var ... (npm ci) Using the appropriate syntax to redirect to stdin for fish fixes the issue. Release Notes: - Fixed redirect stdin command for fish shell --- crates/task/src/shell_builder.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/task/src/shell_builder.rs b/crates/task/src/shell_builder.rs index 55cffa24452a0a71887f25e1bc13a7ce7d642332..a19a6e814a4a75aadedd45b308ea89878b3a4839 100644 --- a/crates/task/src/shell_builder.rs +++ b/crates/task/src/shell_builder.rs @@ -86,9 +86,12 @@ impl ShellBuilder { }); if self.redirect_stdin { match self.kind { + ShellKind::Fish => { + combined_command.insert_str(0, "begin; "); + combined_command.push_str("; end {