From a9c6be4162bd15bd41ba3605127b56cb1eb32f32 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 25 Feb 2024 22:06:19 +0000 Subject: Add part of the implementation for add --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main.rs') 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 = 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()) } -- cgit