aboutsummaryrefslogtreecommitdiff
path: root/src/cli/cmd/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/cmd/mod.rs')
-rw-r--r--src/cli/cmd/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cli/cmd/mod.rs b/src/cli/cmd/mod.rs
index 29063e8..42e865a 100644
--- a/src/cli/cmd/mod.rs
+++ b/src/cli/cmd/mod.rs
@@ -1,7 +1,11 @@
//! The commands that can be performed in the CLI
+pub mod edit;
+pub mod read;
pub mod save;
+pub use edit::*;
+pub use read::*;
pub use save::*;
use crate::Editor;
@@ -32,6 +36,8 @@ pub fn parse_command(string: &str) -> Result<Box<dyn Command>, CmdParseError> {
let parts: Vec<&str> = string.split_whitespace().collect();
match parts[0] {
"w" => Ok(Box::new(Save::from_args(&parts[1..])?)),
+ "e" => Ok(Box::new(Edit::from_args(&parts[1..])?)),
+ "r" => Ok(Box::new(Read::from_args(&parts[1..])?)),
other => Err(CmdParseError::NoSuchCmd(other.to_owned())),
}
}