diff options
Diffstat (limited to 'src/history.rs')
-rw-r--r-- | src/history.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/history.rs b/src/history.rs index 14e2594..4d1d453 100644 --- a/src/history.rs +++ b/src/history.rs @@ -21,7 +21,7 @@ impl History { } pub async fn run(&mut self, cmd: &str) -> anyhow::Result<usize> { - let (exe, args) = parse_cmd(cmd); + let (exe, args) = crate::parse::cmd(cmd); let mut process = async_std::process::Command::new(&exe); process.args(&args); let mut child = process @@ -364,12 +364,3 @@ impl ExitInfo { } } } - -fn parse_cmd(full_cmd: &str) -> (String, Vec<String>) { - let mut parts = full_cmd.split(' '); - let cmd = parts.next().unwrap(); - ( - cmd.to_string(), - parts.map(std::string::ToString::to_string).collect(), - ) -} |