Link command WIP

This commit is contained in:
2023-03-15 16:22:19 +01:00
parent 5fe8a29842
commit 1eaf759599
16 changed files with 500 additions and 0 deletions

19
src/application/mod.rs Normal file
View File

@@ -0,0 +1,19 @@
use crate::command::Command;
use crate::commands;
pub fn run(args: Vec<String>) {
if args.len() < 2 {
println!("No command provided");
return;
}
let command: Option<Box<dyn Command>> = match args[1].as_str() {
"link" => Some(Box::new(commands::link::LinkCommand {})),
_ => None,
};
match command {
Some(command) => command.run(&args[2..]),
None => println!("Invalid command: {}", args[1]),
}
}