Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
settings_ui: Don't show sh as default shell on windows (#43276)
Ben Kunkle34a2e1d56b54
diff --git a/crates/settings_ui/src/page_data.rs b/crates/settings_ui/src/page_data.rsindex edd488f419e..7cc5705ced9 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<SettingsPage> {.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<SettingsPage> {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<SettingsPage> {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,