aboutsummaryrefslogtreecommitdiff
path: root/src/command/version.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/version.rs')
-rw-r--r--src/command/version.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/command/version.rs b/src/command/version.rs
new file mode 100644
index 0000000..fae7596
--- /dev/null
+++ b/src/command/version.rs
@@ -0,0 +1,32 @@
+use std::io::Result;
+
+pub struct Version;
+
+impl Version {
+ pub fn new() -> Self {
+ Version
+ }
+}
+
+impl super::Command for Version {
+ fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+ vec![]
+ }
+
+ fn execute(&self, input: Option<&String>) -> Result<()> {
+ println!("Version: {:?}!", input);
+ return Ok(())
+ }
+
+ fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
+ vec![]
+ }
+
+ fn command(&self) -> &'static str {
+ "version"
+ }
+
+ fn help(&self) -> &'static str {
+ "\t\t\t\tPrints the version"
+ }
+}