1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2025-07-12 14:15:38 +00:00
vento/src/main.rs
Lux Aliaga 282a358f6e vento: Imported changes to Git
Since I didn't work on the initial part of the project on Git, I guess
I'll just do a big commit with all of what I did. This includes the
inventory management commands "list" and "switch", plus the command to
initialize Vento.
2022-09-14 09:36:34 -03:00

25 lines
595 B
Rust

use std::env;
use colored::Colorize;
mod inv;
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() >= 2 {
match args[1].as_str() {
"init" => inv::init(),
"list" => {
if args.len() == 3 {
inv::list(args[2].as_str());
} else {
inv::list("active");
};
},
"switch" => inv::switch(),
_ => println!("❔ Command not found")
}
} else {
println!("{} by nixgoat", format!("Vento").bold().blue());
}
}