feat: update help flag

This commit is contained in:
2026-06-06 21:22:46 +08:00
parent 6424aab69d
commit c8cb155e5a
10 changed files with 28 additions and 16 deletions

View File

@@ -34,9 +34,12 @@ pub struct AddArgs {
}
pub fn add(args: &[String]) -> i32 {
if args.first().map_or(false, |a| a == "--help") {
if args.first().is_some_and(|a| a == "--help") {
printc("USAGE:", BOLD_GREEN);
printc(" dcr add <name> <source> [--branch <b>] [--tag <t>] [--rev <r>]", BOLD_CYAN);
printc(
" dcr add <name> <source> [--branch <b>] [--tag <t>] [--rev <r>]",
BOLD_CYAN,
);
println!();
printc("DESCRIPTION:", BOLD_GREEN);
println!(" Adds a dependency to the project.");