]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/mod.rs
Add mac
[rbdr/blog] / src / command / mod.rs
index c2077541b1acf97a320f00668300c822390b36c8..0c96e6f57d7d51af6811dc0bbed4edb2c6c87a57 100644 (file)
@@ -7,9 +7,11 @@ pub mod add_remote;
 pub mod remove_remote;
 pub mod sync_up;
 pub mod sync_down;
+pub mod status;
 pub mod version;
 pub mod help;
 
+
 use std::io::Result;
 
 use add::Add;
@@ -22,11 +24,14 @@ use remove_remote::RemoveRemote;
 use sync_up::SyncUp;
 use sync_down::SyncDown;
 use version::Version;
+use status::Status;
 use help::Help;
 
+use crate::configuration::Configuration;
+
 pub trait Command {
     fn before_dependencies(&self) -> Vec<Box<dyn Command>>;
-    fn execute(&self, input: Option<&String>) -> Result<()>;
+    fn execute(&self, input: Option<&String>, configuration: &Configuration, command: &String) -> Result<()>;
     fn after_dependencies(&self) -> Vec<Box<dyn Command>>;
     fn command(&self) -> &'static str;
     fn help(&self) -> &'static str;
@@ -43,6 +48,7 @@ pub fn available_commands() -> Vec<Box<dyn Command>> {
         Box::new(RemoveRemote::new()),
         Box::new(SyncUp::new()),
         Box::new(SyncDown::new()),
+        Box::new(Status::new()),
         Box::new(Version::new()),
         Box::new(Help::new())
     ]