MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / expand_proxy_command_arg

Function expand_proxy_command_arg

crates/openshell-core/src/forward.rs:152–162  ·  view source on GitHub ↗
(arg: &str)

Source from the content-addressed store, hash-verified

150/// Expand a `ProxyCommand=<value>` element into matcher tokens.
151#[cfg(any(target_os = "linux", test))]
152fn expand_proxy_command_arg(arg: &str) -> Vec<String> {
153 let Some(value) = arg.strip_prefix("ProxyCommand=") else {
154 return vec![arg.to_string()];
155 };
156 let mut words = split_proxy_command_words(value);
157 if words.is_empty() {
158 return vec![arg.to_string()];
159 }
160 words[0] = format!("ProxyCommand={}", words[0]);
161 words
162}
163
164/// Split shell words well enough to round-trip values emitted by [`shell_escape`].
165#[cfg(any(target_os = "linux", test))]

Calls 2

is_emptyMethod · 0.45