From 34a2e1d56b54513098ddd95edcb29f6d403145f0 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Sun, 23 Nov 2025 13:52:50 -0800 Subject: [PATCH] settings_ui: Don't show sh as default shell on windows (#43276) Closes #ISSUE Release Notes: - Fixed an issue in the settings UI where changing the terminal shell would set the default shell to `sh` on Windows --- crates/settings_ui/src/page_data.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/settings_ui/src/page_data.rs b/crates/settings_ui/src/page_data.rs index edd488f419eeee0a7074a95697d9615317891a4d..7cc5705ced9bc2267834044eff5e5def78182bc4 100644 --- a/crates/settings_ui/src/page_data.rs +++ b/crates/settings_ui/src/page_data.rs @@ -4577,6 +4577,11 @@ pub(crate) fn settings_data(cx: &App) -> Vec { .project .shell .get_or_insert_with(|| settings::Shell::default()); + let default_shell = if cfg!(target_os = "windows") { + "powershell.exe" + } else { + "sh" + }; *settings_value = match value { settings::ShellDiscriminants::System => { settings::Shell::System @@ -4585,7 +4590,7 @@ pub(crate) fn settings_data(cx: &App) -> Vec { let program = match settings_value { settings::Shell::Program(p) => p.clone(), settings::Shell::WithArguments { program, .. } => program.clone(), - _ => String::from("sh"), + _ => String::from(default_shell), }; settings::Shell::Program(program) }, @@ -4595,7 +4600,7 @@ pub(crate) fn settings_data(cx: &App) -> Vec { settings::Shell::WithArguments { program, args, title_override } => { (program.clone(), args.clone(), title_override.clone()) }, - _ => (String::from("sh"), vec![], None), + _ => (String::from(default_shell), vec![], None), }; settings::Shell::WithArguments { program,