Skip to content

Commit

Permalink
glcli: Add global options
Browse files Browse the repository at this point in the history
The Options "data_dir", "network" and "verbose" are set to be global options.

Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet committed Oct 7, 2024
1 parent c86037e commit a219ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/gl-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ mod util;
#[command(author, version, about, long_about = None)]
struct Cli {
/// The directory containing the seed and the credentials
#[arg(short, long)]
#[arg(short, long, global = true, help_heading = "Global options")]
data_dir: Option<String>,
/// Bitcoin network to use. Supported networks are "signet" and "bitcoin"
#[arg(short, long, default_value = "bitcoin", value_parser = clap::value_parser!(Network))]
#[arg(short, long, default_value = "bitcoin", value_parser = clap::value_parser!(Network), global = true, help_heading = "Global options")]
network: Network,
#[arg(long, short)]
#[arg(long, short, global = true, help_heading = "Global options")]
verbose: bool,
#[command(subcommand)]
cmd: Commands,
Expand Down

0 comments on commit a219ae5

Please sign in to comment.