Skip to content

Commit

Permalink
Cleanup cli help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
notmandatory committed Feb 3, 2021
1 parent a64086e commit e92fcaa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bdk_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use regex::Regex;
version = option_env ! ("CARGO_PKG_VERSION").unwrap_or("unknown"),
author = option_env ! ("CARGO_PKG_AUTHORS").unwrap_or(""))]
struct ReplOpt {
/// Wallet sub-command
/// Repl sub-command
#[structopt(subcommand)]
pub subcommand: ReplSubCommand,
}
Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,27 +189,32 @@ pub struct CliOpts {

/// CLI sub-commands
///
/// The top level mode for subsequent sub-commands, each may have different required options. For
/// The top level sub-commands, each may have different required options. For
/// instance [`CliSubCommand::Wallet`] requires [`WalletOpts`] with a required descriptor but
/// [`CliSubCommand::Key`] sub-command does not. [`CliSubCommand::Repl`] also requires
/// [`WalletOpts`] and a descriptor because in this mode both [`WalletSubCommand`] and
/// [`KeySubCommand`] sub-commands are available.
///
#[derive(Debug, StructOpt, Clone, PartialEq)]
#[structopt(rename_all = "snake",
long_about = "Top level options and command modes")]
pub enum CliSubCommand {
/// Wallet options and sub-commands
#[structopt(long_about = "Wallet mode")]
Wallet {
#[structopt(flatten)]
wallet_opts: WalletOpts,
#[structopt(subcommand)]
subcommand: WalletSubCommand,
},
/// Key management sub-commands
#[structopt(long_about = "Key management mode")]
Key {
#[structopt(subcommand)]
subcommand: KeySubCommand,
},
/// Enter REPL command loop mode
#[structopt(long_about = "REPL command loop mode")]
Repl {
#[structopt(flatten)]
wallet_opts: WalletOpts,
Expand Down

0 comments on commit e92fcaa

Please sign in to comment.