Improve CLI usage messages (#8972)
* Improve CLI usage messages * stragglers * Apply review feedback Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
@@ -73,16 +73,16 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account")
|
||||
.index(1)
|
||||
.value_name("KEYPAIR")
|
||||
.value_name("ACCOUNT_KEYPAIR")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_signer)
|
||||
.help("Signing authority of the stake address to fund")
|
||||
.help("Stake account to create (or base of derived address if --seed is used)")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("amount")
|
||||
.index(2)
|
||||
.value_name("NUMBER")
|
||||
.value_name("AMOUNT")
|
||||
.takes_value(true)
|
||||
.validator(is_amount)
|
||||
.required(true)
|
||||
@@ -94,7 +94,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.value_name("PUBKEY")
|
||||
.takes_value(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("Identity of the custodian (can withdraw before lockup expires)")
|
||||
.help("Authority to modify lockups")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("seed")
|
||||
@@ -140,7 +140,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.takes_value(true)
|
||||
.value_name("KEYPAIR")
|
||||
.validator(is_valid_signer)
|
||||
.help("Source account of funds (if different from client local account)"),
|
||||
.help("Source account of funds [default: cli config keypair]"),
|
||||
)
|
||||
.offline_args()
|
||||
.arg(nonce_arg())
|
||||
@@ -160,7 +160,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -169,7 +169,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("vote_account_pubkey")
|
||||
.index(2)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("VOTE_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -187,7 +187,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -196,7 +196,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("authorized_pubkey")
|
||||
.index(2)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("AUTHORIZED_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -214,7 +214,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -223,7 +223,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("authorized_pubkey")
|
||||
.index(2)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("AUTHORIZED_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -241,7 +241,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -255,29 +255,29 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("split-stake")
|
||||
.about("Split a stake account")
|
||||
.about("Duplicate a stake account, splitting the tokens between the two")
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("Stake account to be split")
|
||||
.help("Stake account to split (or base of derived address if --seed is used)")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("split_stake_account")
|
||||
.index(2)
|
||||
.value_name("KEYPAIR")
|
||||
.value_name("ACCOUNT_KEYPAIR")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_signer)
|
||||
.help("Keypair of the new stake account to split funds into")
|
||||
.help("Keypair of the new stake account")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("amount")
|
||||
.index(3)
|
||||
.value_name("NUMBER")
|
||||
.value_name("AMOUNT")
|
||||
.takes_value(true)
|
||||
.validator(is_amount)
|
||||
.required(true)
|
||||
@@ -302,7 +302,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
@@ -311,16 +311,16 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("destination_account_pubkey")
|
||||
.index(2)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("RECIPIENT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("The account to which the SOL should be transferred")
|
||||
.help("Recipient of withdrawn SOL")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("amount")
|
||||
.index(3)
|
||||
.value_name("NUMBER")
|
||||
.value_name("AMOUNT")
|
||||
.takes_value(true)
|
||||
.validator(is_amount)
|
||||
.required(true)
|
||||
@@ -338,11 +338,11 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("Stake account for which to set Lockup")
|
||||
.help("Stake account for which to set lockup parameters")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("lockup_epoch")
|
||||
@@ -365,7 +365,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.value_name("PUBKEY")
|
||||
.takes_value(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("Identity of the new lockup custodian (can withdraw before lockup expires)")
|
||||
.help("Identity of a new lockup custodian")
|
||||
)
|
||||
.group(ArgGroup::with_name("lockup_details")
|
||||
.args(&["lockup_epoch", "lockup_date", "new_custodian"])
|
||||
@@ -376,7 +376,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.takes_value(true)
|
||||
.value_name("KEYPAIR")
|
||||
.validator(is_valid_signer)
|
||||
.help("Public key of signing custodian [default: cli config pubkey]")
|
||||
.help("Keypair of the existing custodian [default: cli config pubkey]")
|
||||
)
|
||||
.offline_args()
|
||||
.arg(nonce_arg())
|
||||
@@ -390,11 +390,11 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(
|
||||
Arg::with_name("stake_account_pubkey")
|
||||
.index(1)
|
||||
.value_name("PUBKEY")
|
||||
.value_name("ACCOUNT_PUBKEY")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.validator(is_valid_pubkey)
|
||||
.help("Address of the stake account to display")
|
||||
.help("The stake account to display")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("lamports")
|
||||
|
Reference in New Issue
Block a user