From fccd3da2576d321bd69f4c8f614d3ff423f11d96 Mon Sep 17 00:00:00 2001 From: saying121 Date: Sun, 28 Apr 2024 23:16:05 +0800 Subject: [PATCH] fix(cli): fix `lcode fzy detail` and `generate` help --- crates/lcode/Cargo.toml | 2 +- crates/lcode/src/cli.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/lcode/Cargo.toml b/crates/lcode/Cargo.toml index 6455b13..fcb62eb 100644 --- a/crates/lcode/Cargo.toml +++ b/crates/lcode/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lcode" -version = "0.8.0" +version = "0.8.1" description = "An application of terminal write leetcode.一个终端刷力扣的应用" documentation = "https://docs.rs/lcode" license = "Apache-2.0" diff --git a/crates/lcode/src/cli.rs b/crates/lcode/src/cli.rs index 8730a31..7cae03d 100644 --- a/crates/lcode/src/cli.rs +++ b/crates/lcode/src/cli.rs @@ -56,7 +56,7 @@ enum Commands { Submit(SubTestArgs), #[command(alias = "sl", about = format!("Get submit list {}", "[ alias: sl ]".bold()))] Sublist(SubTestArgs), - #[command(alias = "g", about = format!("Generate a config, will also be automatically generated at runtime {}","[ alias: g ]".bold()))] + #[command(alias = "g", about = format!("Generate a config {}", "[ alias: g ]".bold()))] Gencon(GenArgs), #[command(alias = "T", about = format!("Open Tui {}", "[ alias: T ]".bold()))] Tui, @@ -95,10 +95,17 @@ struct InterArgs { #[derive(Subcommand)] enum DetailOrEdit { #[command(about = "View detail")] - Detail(DetailArgs), + Detail(DetailArgsFzy), #[command(about = "Edit code")] Edit, } +#[derive(Debug)] +#[derive(Args)] +#[command(args_conflicts_with_subcommands = true)] +struct DetailArgsFzy { + #[arg(short, long, help = "Force update question's information")] + force: bool, +} #[derive(Debug)] #[derive(Args)]