diff --git a/async/examples/sunsetc.rs b/async/examples/sunsetc.rs index b4a36cc141b7e6e6b4be216bbdd410df933f14a9..65e61df247b1d09fc86ee3b44eb1e754c1150fe8 100644 --- a/async/examples/sunsetc.rs +++ b/async/examples/sunsetc.rs @@ -63,7 +63,7 @@ struct Args { /// ssh subsystem (eg "sftp") subsystem: Option<String>, - #[argh(positional)] + #[argh(positional, greedy)] /// command cmd: Vec<String>, @@ -97,22 +97,12 @@ fn parse_args() -> Result<Args> { let cmd = in_args.next().expect("command name"); let mut mangled_args = vec![]; - let mut not_flags = 0; - for a in in_args { if a.starts_with("-o") { let (o, v) = a.split_at(2); mangled_args.push(o.to_string()); mangled_args.push(v.to_string()); } else { - - // Flag arguments after the remote command should get escaped - if !a.starts_with('-') { - not_flags += 1; - if not_flags == 2 { - mangled_args.push("--".to_string()); - } - } mangled_args.push(a.to_string()) } } diff --git a/async/src/known_hosts.rs b/async/src/known_hosts.rs index 06123315f6505699dc083982fa55e741ad9d2675..aec48093e936193abcad9886dd650e5278d4390b 100644 --- a/async/src/known_hosts.rs +++ b/async/src/known_hosts.rs @@ -101,6 +101,7 @@ pub fn check_known_hosts_file( Ok(k) => k, Err(e) => { warn!("Unparsed key for {} on line {}:{}", host, p.display(), line); + trace!("{e:?}"); continue; } };