Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't show default shell breadcrumbs (#36070)
localcc6307105976cc
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 3e7d9c0ad4e..c3c6de9e53d 100644--- a/crates/terminal/src/terminal.rs+++ b/crates/terminal/src/terminal.rs@@ -408,7 +408,13 @@ impl TerminalBuilder {let terminal_title_override = shell_params.as_ref().and_then(|e| e.title_override.clone());#[cfg(windows)]- let shell_program = shell_params.as_ref().map(|params| params.program.clone());+ let shell_program = shell_params.as_ref().map(|params| {+ use util::ResultExt;++ Self::resolve_path(¶ms.program)+ .log_err()+ .unwrap_or(params.program.clone())+ });let pty_options = {let alac_shell = shell_params.map(|params| {@@ -589,6 +595,24 @@ impl TerminalBuilder {self.terminal}++ #[cfg(windows)]+ fn resolve_path(path: &str) -> Result<String> {+ use windows::Win32::Storage::FileSystem::SearchPathW;+ use windows::core::HSTRING;++ let path = if path.starts_with(r"\\?\") || !path.contains(&['/', '\\']) {+ path.to_string()+ } else {+ r"\\?\".to_string() + path+ };++ let required_length = unsafe { SearchPathW(None, &HSTRING::from(&path), None, None, None) };+ let mut buf = vec![0u16; required_length as usize];+ let size = unsafe { SearchPathW(None, &HSTRING::from(&path), None, Some(&mut buf), None) };++ Ok(String::from_utf16(&buf[..size as usize])?)+ }}#[derive(Debug, Clone, Deserialize, Serialize)]