aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-12-24 23:32:49 -0800
committerGitHub <noreply@github.com>2017-12-24 23:32:49 -0800
commit9979821629fc8943ad50b06e934a83a24b352a7f (patch)
treee5715b3166aff24d07719b2fe8acf286f2e1508f /src
parent023e4bc607760528e96d7e11214d9223ad4ff616 (diff)
parenta97fab4894f1a4c4c80cc41db67b60daa50c5f4a (diff)
Merge pull request #4 from iximeow/command-fix
Command fix
Diffstat (limited to 'src')
-rw-r--r--src/tw/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tw/mod.rs b/src/tw/mod.rs
index f9fda69..2eb574f 100644
--- a/src/tw/mod.rs
+++ b/src/tw/mod.rs
@@ -535,6 +535,8 @@ fn parse_word_command<'a, 'b>(line: &'b str, commands: &[&'a Command]) -> Option
if cmd.params == 0 {
if line == cmd.keyword {
return Some(("", &cmd));
+ } else if line.starts_with(&format!("{} ", cmd.keyword)) {
+ return Some((line.get((cmd.keyword.len() + 1)..).unwrap().trim(), &cmd));
}
} else if line.starts_with(cmd.keyword) {
if line.find(" ").map(|x| x == cmd.keyword.len()).unwrap_or(false) {