Cargo.lock 🔗
@@ -13769,7 +13769,6 @@ dependencies = [
"serde",
"serde_json",
"settings",
- "shlex",
"smol",
"tempfile",
"thiserror 2.0.17",
Jakub Konka created
Cargo.lock | 1 -
crates/remote/Cargo.toml | 1 -
crates/remote/src/transport/ssh.rs | 5 ++++-
crates/util/src/shell.rs | 4 ++++
4 files changed, 8 insertions(+), 3 deletions(-)
@@ -13769,7 +13769,6 @@ dependencies = [
"serde",
"serde_json",
"settings",
- "shlex",
"smol",
"tempfile",
"thiserror 2.0.17",
@@ -34,7 +34,6 @@ rpc = { workspace = true, features = ["gpui"] }
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
-shlex.workspace = true
smol.workspace = true
tempfile.workspace = true
thiserror.workspace = true
@@ -1077,7 +1077,10 @@ impl SshConnectionOptions {
"-w",
];
- let mut tokens = shlex::split(input).context("invalid input")?.into_iter();
+ let mut tokens = ShellKind::Posix
+ .split(input)
+ .context("invalid input")?
+ .into_iter();
'outer: while let Some(arg) = tokens.next() {
if ALLOWED_OPTS.contains(&(&arg as &str)) {
@@ -435,6 +435,10 @@ impl ShellKind {
})
}
+ pub fn split(&self, input: &str) -> Option<Vec<String>> {
+ shlex::split(input)
+ }
+
pub const fn activate_keyword(&self) -> &'static str {
match self {
ShellKind::Cmd => "",