mirror of
https://github.com/veeso/termscp.git
synced 2026-06-08 14:18:41 +02:00
fix: pass full command string to exec, not just the first word
The `Exec` arm of `Command::from_str` only captured the first whitespace-delimited token, silently dropping all arguments. Now passes the entire input string so e.g. `ls -la /tmp` works.
This commit is contained in:
@@ -30,7 +30,7 @@ impl FromStr for Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some("exit") | Some("logout") => Ok(Command::Exit),
|
Some("exit") | Some("logout") => Ok(Command::Exit),
|
||||||
Some(cmd) => Ok(Command::Exec(cmd.to_string())),
|
Some(_) => Ok(Command::Exec(s.to_string())),
|
||||||
None => Err("".to_string()),
|
None => Err("".to_string()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user