aboutsummaryrefslogtreecommitdiff
path: root/src/command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.rs')
-rw-r--r--src/command.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/command.rs b/src/command.rs
index 850261c..38d48e9 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -17,6 +17,7 @@ static COMMANDS: &'static [&'static str] = &[
17 "month-prev", 17 "month-prev",
18 "month-next", 18 "month-next",
19 "quit", 19 "quit",
20 "write",
20 "help", 21 "help",
21]; 22];
22 23
@@ -113,6 +114,7 @@ pub enum Command {
113 TrackUp(String), 114 TrackUp(String),
114 TrackDown(String), 115 TrackDown(String),
115 Help(Option<String>), 116 Help(Option<String>),
117 Write,
116 Quit, 118 Quit,
117 Blank, 119 Blank,
118} 120}
@@ -197,6 +199,7 @@ impl Command {
197 "mprev" | "month-prev" => return Ok(Command::MonthPrev), 199 "mprev" | "month-prev" => return Ok(Command::MonthPrev),
198 "mnext" | "month-next" => return Ok(Command::MonthNext), 200 "mnext" | "month-next" => return Ok(Command::MonthNext),
199 "q" | "quit" => return Ok(Command::Quit), 201 "q" | "quit" => return Ok(Command::Quit),
202 "w" | "write" => return Ok(Command::Write),
200 "" => return Ok(Command::Blank), 203 "" => return Ok(Command::Blank),
201 s => return Err(CommandLineError::InvalidCommand(s.into())), 204 s => return Err(CommandLineError::InvalidCommand(s.into())),
202 } 205 }