X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/d620665f6b2e1ae5db4c98a09e35bd63133ae87f..27c166ebb8ac1bdeebc39a642af15f491edff516:/src/command/mod.rs?ds=sidebyside diff --git a/src/command/mod.rs b/src/command/mod.rs index c207754..0c96e6f 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -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>; - fn execute(&self, input: Option<&String>) -> Result<()>; + fn execute(&self, input: Option<&String>, configuration: &Configuration, command: &String) -> Result<()>; fn after_dependencies(&self) -> Vec>; fn command(&self) -> &'static str; fn help(&self) -> &'static str; @@ -43,6 +48,7 @@ pub fn available_commands() -> Vec> { Box::new(RemoveRemote::new()), Box::new(SyncUp::new()), Box::new(SyncDown::new()), + Box::new(Status::new()), Box::new(Version::new()), Box::new(Help::new()) ]