Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add help text to CLI #613

Merged
merged 2 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ use {
pub(crate) struct Options {
#[clap(
long,
help = "Limit the ordinal index to <MAX_INDEX_SIZE> bytes. [mainnet, testnet, and signet default: 1 TiB, regtest default: 10 MiB]"
help = "Limit the ordinal index to <MAX_INDEX_SIZE> bytes. This cannot be changed later. [mainnet, testnet, and signet default: 1 TiB, regtest default: 10 MiB]"
)]
max_index_size: Option<Bytes>,
#[clap(long)]
#[clap(long, help = "Load Bitcoin Core RPC cookie file from <COOKIE_FILE>.")]
cookie_file: Option<PathBuf>,
#[clap(long)]
#[clap(long, help = "Connect to Bitcoin Core RPC at <RPC_URL>.")]
rpc_url: Option<String>,
#[clap(long, arg_enum, default_value = "mainnet")]
#[clap(long, arg_enum, default_value = "mainnet", help = "Index <CHAIN>.")]
pub(crate) chain: Chain,
#[clap(long)]
#[clap(long, help = "Store index in <DATA_DIR>.")]
data_dir: Option<PathBuf>,
#[clap(long)]
#[clap(long, help = "Load Bitcoin Core data dir from <BITCOIN_DATA_DIR>.")]
bitcoin_data_dir: Option<PathBuf>,
#[clap(long)]
#[clap(long, help = "Limit index to <HEIGHT_LIMIT> blocks.")]
pub(crate) height_limit: Option<u64>,
}

Expand Down
1 change: 1 addition & 0 deletions src/subcommand/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct Find {
#[clap(help = "Find output and offset of <ORDINAL>.")]
ordinal: Ordinal,
}

Expand Down
1 change: 1 addition & 0 deletions src/subcommand/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct List {
#[clap(help = "List ordinal ranges in <OUTPOINT>.")]
outpoint: OutPoint,
}

Expand Down
1 change: 1 addition & 0 deletions src/subcommand/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct Parse {
#[clap(help = "Parse <ORDINAL>.")]
ordinal: Ordinal,
}

Expand Down
3 changes: 2 additions & 1 deletion src/subcommand/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct Range {
#[clap(long)]
#[clap(long, help = "Display range as names.")]
name: bool,
#[clap(help = "List ordinal range in subsidy at <HEIGHT>.")]
height: Height,
}

Expand Down
1 change: 1 addition & 0 deletions src/subcommand/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct Traits {
#[clap(help = "Show traits for <ORDINAL>.")]
ordinal: Ordinal,
}

Expand Down