Skip to content

Commit

Permalink
fix: re-enable --help option
Browse files Browse the repository at this point in the history
clap-rs/clap#4367
clap-rs/clap#4371

Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
  • Loading branch information
wfxr committed Oct 19, 2022
1 parent d491596 commit 6f6e670
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/cli.rs
@@ -1,4 +1,4 @@
use clap::{Parser, Subcommand, ValueEnum, ValueHint};
use clap::{ArgAction, Parser, Subcommand, ValueEnum, ValueHint};

#[derive(Parser)]
#[command(about, version)]
Expand All @@ -17,14 +17,13 @@ pub struct TiCLI {
#[arg(short, long, value_enum, default_value_t = Mode::Txn)]
pub mode: Mode,

/// Print help information.
// FIXME: https://github.com/clap-rs/clap/issues/4367
// #[arg(long, action = ArgAction::Help)]
// pub help: bool,

/// Sub command.
#[command(subcommand)]
pub command: Command,

/// Print help information.
#[arg(long, action = ArgAction::Help, value_parser = clap::value_parser!(bool))]
pub help: (),
}

#[derive(Subcommand)]
Expand Down

0 comments on commit 6f6e670

Please sign in to comment.