aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-02-25 22:06:19 +0000
committerRuben Beltran del Rio <git@r.bdr.sh>2024-02-25 22:06:19 +0000
commita9c6be4162bd15bd41ba3605127b56cb1eb32f32 (patch)
tree6d97b0c6286b1eabb2ef5cab34b472f1622584e5 /src/main.rs
parent53812065cf124b6c1bc40fceec46f8c161033e29 (diff)
Add part of the implementation for add
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index bf1e184..4cb8036 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,13 +1,17 @@
// mod argument_parser;
mod configuration;
mod command;
+mod constants;
+mod metadata;
use std::iter::once;
use std::env::args;
use std::io::Result;
use command::{available_commands, Command, help::Help};
+use configuration::Configuration;
fn main() -> Result<()> {
+ let configuration = Configuration::new();
let commands = available_commands();
let arguments: Vec<String> = args().collect();
@@ -23,7 +27,7 @@ fn main() -> Result<()> {
.collect();
for command in command_chain {
- let result = command.execute(arguments.get(2));
+ let result = command.execute(arguments.get(2), &configuration, command_name);
if let Err(_) = result {
return result;
}
@@ -33,5 +37,5 @@ fn main() -> Result<()> {
}
}
- Help::new().execute(None)
+ Help::new().execute(None, &configuration, &"help".to_string())
}