Browse Source

fix: arguments will now be parsed

main
fdai7375 2 years ago
committed by fdai7451
parent
commit
b242c845be
  1. 2
      src/parse.rs

2
src/parse.rs

@ -7,7 +7,7 @@ pub fn parse_line(line: &str) -> io::Result<()> {
let tokens = line.trim().split(' ').collect::<Vec<&str>>(); let tokens = line.trim().split(' ').collect::<Vec<&str>>();
let mut args: &[&str] = &[]; let mut args: &[&str] = &[];
let command = tokens[0]; let command = tokens[0];
if !args.is_empty() {
if tokens.len() > 1 {
args = &tokens[1..]; args = &tokens[1..];
} }
let mut command = Command::new(command); let mut command = Command::new(command);

Loading…
Cancel
Save