diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 558772b76f..96cf1072d9 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -976,7 +976,6 @@ dependencies = [ "reqwest", "serde", "serde_json", - "shell-words", "shlex", "strum 0.27.2", "strum_macros 0.27.2", @@ -4399,12 +4398,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - [[package]] name = "shlex" version = "1.3.0" diff --git a/codex-rs/tui/Cargo.toml b/codex-rs/tui/Cargo.toml index 9c990755c6..782861aab8 100644 --- a/codex-rs/tui/Cargo.toml +++ b/codex-rs/tui/Cargo.toml @@ -60,7 +60,6 @@ regex-lite = "0.1" reqwest = { version = "0.12", features = ["json"] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } -shell-words = "1.1" shlex = "1.3.0" strum = "0.27.2" strum_macros = "0.27.2" diff --git a/codex-rs/tui/src/bottom_pane/string_utils.rs b/codex-rs/tui/src/bottom_pane/string_utils.rs index d2cbd968ca..eb3484dbf2 100644 --- a/codex-rs/tui/src/bottom_pane/string_utils.rs +++ b/codex-rs/tui/src/bottom_pane/string_utils.rs @@ -9,10 +9,9 @@ pub fn normalize_pasted_path(pasted: &str) -> Option { } // shell-escaped single path → unescaped - if let Ok(mut parts) = shell_words::split(pasted) { - if parts.len() == 1 { - return Some(PathBuf::from(parts.remove(0))); - } + let parts: Vec = shlex::Shlex::new(pasted).collect(); + if parts.len() == 1 { + return parts.into_iter().next().map(PathBuf::from); } // simple quoted path fallback