From 27986d7abb76135bceed7f3526ac80758bcb23c3 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Fri, 14 Sep 2018 16:32:57 -0600 Subject: [PATCH] Standardize CLI help text --- src/bin/bench-tps.rs | 18 +++++++++--------- src/bin/drone.rs | 8 ++++---- src/bin/fullnode-config.rs | 6 +++--- src/bin/fullnode.rs | 6 +++--- src/bin/genesis.rs | 4 ++-- src/bin/keygen.rs | 3 +-- src/bin/ledger-tool.rs | 6 +++--- src/bin/wallet.rs | 8 ++++---- 8 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/bin/bench-tps.rs b/src/bin/bench-tps.rs index 2b9327e4d..c70758f0b 100644 --- a/src/bin/bench-tps.rs +++ b/src/bin/bench-tps.rs @@ -406,7 +406,7 @@ fn main() { .long("network") .value_name("HOST:PORT") .takes_value(true) - .help("rendezvous with the network at this gossip entry point, defaults to 127.0.0.1:8001"), + .help("Rendezvous with the network at this gossip entry point; defaults to 127.0.0.1:8001"), ) .arg( Arg::with_name("identity") @@ -415,7 +415,7 @@ fn main() { .value_name("PATH") .takes_value(true) .required(true) - .help("file containing a client identity (keypair)"), + .help("File containing a client identity (keypair)"), ) .arg( Arg::with_name("num-nodes") @@ -423,12 +423,12 @@ fn main() { .long("num-nodes") .value_name("NUM") .takes_value(true) - .help("wait for NUM nodes to converge"), + .help("Wait for NUM nodes to converge"), ) .arg( Arg::with_name("reject-extra-nodes") .long("reject-extra-nodes") - .help("require exactly num-nodes on convergence. Appropriate only for internal networks"), + .help("Require exactly `num-nodes` on convergence. Appropriate only for internal networks"), ) .arg( Arg::with_name("threads") @@ -436,31 +436,31 @@ fn main() { .long("threads") .value_name("NUM") .takes_value(true) - .help("number of threads"), + .help("Number of threads"), ) .arg( Arg::with_name("duration") .long("duration") .value_name("SECS") .takes_value(true) - .help("run benchmark for SECS seconds then exit, default is forever"), + .help("Seconds to run benchmark, then exit; default is forever"), ) .arg( Arg::with_name("converge-only") .long("converge-only") - .help("exit immediately after converging"), + .help("Exit immediately after converging"), ) .arg( Arg::with_name("sustained") .long("sustained") - .help("use sustained performance mode vs. peak mode. This overlaps the tx generation with transfers."), + .help("Use sustained performance mode vs. peak mode. This overlaps the tx generation with transfers."), ) .arg( Arg::with_name("tx_count") .long("tx_count") .value_name("NUM") .takes_value(true) - .help("number of transactions to send per batch") + .help("Number of transactions to send per batch") ) .get_matches(); diff --git a/src/bin/drone.rs b/src/bin/drone.rs index a6c0c4925..1bd7a9f37 100644 --- a/src/bin/drone.rs +++ b/src/bin/drone.rs @@ -47,7 +47,7 @@ fn main() -> Result<(), Box> { .value_name("HOST:PORT") .takes_value(true) .required(true) - .help("rendezvous with the network at this gossip entry point"), + .help("Rendezvous with the network at this gossip entry point"), ).arg( Arg::with_name("keypair") .short("k") @@ -55,17 +55,17 @@ fn main() -> Result<(), Box> { .value_name("PATH") .takes_value(true) .required(true) - .help("File to read the client's keypair from"), + .help("File from which to read the mint's keypair"), ).arg( Arg::with_name("slice") .long("slice") - .value_name("SECONDS") + .value_name("SECS") .takes_value(true) .help("Time slice over which to limit requests to drone"), ).arg( Arg::with_name("cap") .long("cap") - .value_name("NUMBER") + .value_name("NUM") .takes_value(true) .help("Request limit for time slice"), ).get_matches(); diff --git a/src/bin/fullnode-config.rs b/src/bin/fullnode-config.rs index b5152dd43..5427a3860 100644 --- a/src/bin/fullnode-config.rs +++ b/src/bin/fullnode-config.rs @@ -20,7 +20,7 @@ fn main() { .short("l") .long("local") .takes_value(false) - .help("detect network address from local machine configuration"), + .help("Detect network address from local machine configuration"), ).arg( Arg::with_name("keypair") .short("k") @@ -33,14 +33,14 @@ fn main() { .short("p") .long("public") .takes_value(false) - .help("detect public network address using public servers"), + .help("Detect public network address using public servers"), ).arg( Arg::with_name("bind") .short("b") .long("bind") .value_name("PORT") .takes_value(true) - .help("bind to port or address"), + .help("Bind to port or address"), ).get_matches(); let bind_addr: SocketAddr = { diff --git a/src/bin/fullnode.rs b/src/bin/fullnode.rs index dccbe458d..0e1de91b6 100644 --- a/src/bin/fullnode.rs +++ b/src/bin/fullnode.rs @@ -33,16 +33,16 @@ fn main() -> () { Arg::with_name("identity") .short("i") .long("identity") - .value_name("FILE") + .value_name("PATH") .takes_value(true) - .help("run with the identity found in FILE"), + .help("Run with the identity found in FILE"), ).arg( Arg::with_name("network") .short("n") .long("network") .value_name("HOST:PORT") .takes_value(true) - .help("connect/rendezvous with the network at this gossip entry point"), + .help("Rendezvous with the network at this gossip entry point"), ).arg( Arg::with_name("ledger") .short("l") diff --git a/src/bin/genesis.rs b/src/bin/genesis.rs index 4533d93d8..35d7afa0d 100644 --- a/src/bin/genesis.rs +++ b/src/bin/genesis.rs @@ -21,7 +21,7 @@ fn main() -> Result<(), Box> { Arg::with_name("tokens") .short("t") .long("tokens") - .value_name("NUMBER") + .value_name("NUM") .takes_value(true) .required(true) .help("Number of tokens with which to initialize mint"), @@ -32,7 +32,7 @@ fn main() -> Result<(), Box> { .value_name("DIR") .takes_value(true) .required(true) - .help("use DIR as persistent ledger location"), + .help("Use directory as persistent ledger location"), ).get_matches(); let tokens = value_t_or_exit!(matches, "tokens", i64); diff --git a/src/bin/keygen.rs b/src/bin/keygen.rs index 1c2326d77..41ff70193 100644 --- a/src/bin/keygen.rs +++ b/src/bin/keygen.rs @@ -21,8 +21,7 @@ fn main() -> Result<(), Box> { .long("outfile") .value_name("PATH") .takes_value(true) - .required(true) - .help("path to generated file"), + .help("Path to generated file"), ).get_matches(); let rnd = SystemRandom::new(); diff --git a/src/bin/ledger-tool.rs b/src/bin/ledger-tool.rs index 503507cc5..188680740 100644 --- a/src/bin/ledger-tool.rs +++ b/src/bin/ledger-tool.rs @@ -21,7 +21,7 @@ fn main() { .value_name("DIR") .takes_value(true) .required(true) - .help("use DIR for ledger location"), + .help("Use directory for ledger location"), ) .arg( Arg::with_name("head") @@ -29,13 +29,13 @@ fn main() { .long("head") .value_name("NUM") .takes_value(true) - .help("at most the first NUM entries in ledger\n (only applies to verify, print, json commands)"), + .help("Limit to at most the first NUM entries in ledger\n (only applies to verify, print, json commands)"), ) .arg( Arg::with_name("precheck") .short("p") .long("precheck") - .help("use ledger_verify() to check internal ledger consistency before proceeding"), + .help("Use ledger_verify() to check internal ledger consistency before proceeding"), ) .subcommand(SubCommand::with_name("print").about("Print the ledger")) .subcommand(SubCommand::with_name("json").about("Print the ledger in JSON format")) diff --git a/src/bin/wallet.rs b/src/bin/wallet.rs index a14c771a1..7315566fb 100644 --- a/src/bin/wallet.rs +++ b/src/bin/wallet.rs @@ -79,16 +79,16 @@ fn main() -> Result<(), Box> { ).arg( Arg::with_name("timeout") .long("timeout") - .value_name("SECONDS") + .value_name("SECS") .takes_value(true) - .help("Max SECONDS to wait to get necessary gossip from the network"), + .help("Max seconds to wait to get necessary gossip from the network"), ).subcommand( SubCommand::with_name("airdrop") .about("Request a batch of tokens") .arg( Arg::with_name("tokens") .long("tokens") - .value_name("NUMBER") + .value_name("NUM") .takes_value(true) .required(true) .help("The number of tokens to request"), @@ -99,7 +99,7 @@ fn main() -> Result<(), Box> { .arg( Arg::with_name("tokens") .long("tokens") - .value_name("NUMBER") + .value_name("NUM") .takes_value(true) .required(true) .help("The number of tokens to send"),