From 99debc2504b9c8f4aa582502982bbb94681139a4 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Thu, 24 Jul 2025 15:39:13 -0400 Subject: [PATCH] Fix environment loading with tcsh (#35054) Closes https://github.com/zed-industries/zed/issues/34973 Fixes an issue where environment variables were not loaded when the user's shell was tcsh and instead a file named `0` was dumped in the current working directory with a copy of your environment variables as json. Follow-up to: - https://github.com/zed-industries/zed/pull/35002 - https://github.com/zed-industries/zed/pull/33599 Release Notes: - Fixed a regression with loading environment variables in nushell --- crates/util/src/shell_env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rs index 6c5eeb6b79..2b1063316f 100644 --- a/crates/util/src/shell_env.rs +++ b/crates/util/src/shell_env.rs @@ -23,7 +23,7 @@ pub fn capture(directory: &std::path::Path) -> Result (FD_STDIN, format!(">[1={}]", FD_STDIN)), // `[1=0]` - Some("nu") => (FD_STDOUT, "".to_string()), + Some("nu") | Some("tcsh") => (FD_STDOUT, "".to_string()), _ => (FD_STDIN, format!(">&{}", FD_STDIN)), // `>&0` }; command.stdin(Stdio::null());