diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 37082a1..820bcb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -319,8 +319,10 @@ fn parse_word_command<'a, 'b>(line: &'b str, commands: &[&'a Command]) -> Option return Some(("", &cmd)); } } else if line.starts_with(cmd.keyword) { - // let inner_twid = u64::from_str(&linestr.split(" ").collect::<Vec<&str>>()[1]).unwrap(); - return Some((line.get((cmd.keyword.len() + 1)..).unwrap().trim(), &cmd)); + if line.find(" ").map(|x| x == cmd.keyword.len()).unwrap_or(false) { + // let inner_twid = u64::from_str(&linestr.split(" ").collect::<Vec<&str>>()[1]).unwrap(); + return Some((line.get((cmd.keyword.len() + 1)..).unwrap().trim(), &cmd)); + } } } return None |