mirror of
https://git.sr.ht/~nixgoat/vento
synced 2025-07-12 14:15:38 +00:00
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.
25 lines
595 B
Rust
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());
|
|
}
|
|
}
|