mirror of
https://github.com/veeso/termscp.git
synced 2026-04-01 15:52:26 -07: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(cmd) => Ok(Command::Exec(cmd.to_string())),
|
||||
Some(_) => Ok(Command::Exec(s.to_string())),
|
||||
None => Err("".to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user