From 63032f6c665c8b8392aba047b8d695a981316006 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 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/task/src/shell_builder.rs b/crates/task/src/shell_builder.rs index 520c04e367..d6091997b2 100644 --- a/crates/task/src/shell_builder.rs +++ b/crates/task/src/shell_builder.rs @@ -87,9 +87,12 @@ impl ShellBuilder { }); if self.redirect_stdin { match self.kind { + ShellKind::Fish => { + combined_command.insert_str(0, "begin; "); + combined_command.push_str("; end