1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2025-11-21 08:03:47 +00:00

main: Added help message

It has a copyright notice and some commands. Not much else, really.
This commit is contained in:
Lux Aliaga 2022-09-14 19:26:35 -03:00
parent 524a5d3674
commit 1ecc16ca9d

View file

@ -26,6 +26,7 @@ fn main() {
let args: Vec<String> = env::args().collect();
if args.len() >= 2 {
match args[1].as_str() {
"help" => help(),
"init" => inv::init(),
"list" => {
if args.len() == 3 {
@ -35,9 +36,26 @@ fn main() {
};
},
"switch" => inv::switch(),
_ => println!("❔ Command not found")
_ => println!("❔ Command not found. Type \"vento help\" to see all commands available.")
}
} else {
println!("{} by nixgoat", format!("Vento").bold().blue());
help();
}
}
fn help() {
println!("{}, a CLI inventory for your files
© 2022 Lux Aliaga. Licensed under GPLv3
{}
- {}: Initializes Vento
- {}: Lists files in selected inventory
- {}: Switches slots
- {}: Displays this message",
format!("Vento").bold().blue(),
format!("Usage:").bold(),
format!("init").bold().green(),
format!("list [slot]").bold().green(),
format!("switch").bold().green(),
format!("help").bold().green());
}