Add some information about what an address can be for CLI commands (#9233)

This commit is contained in:
sakridge
2020-04-01 19:45:37 -07:00
committed by GitHub
parent 8b14eb9020
commit a8817fb973
6 changed files with 146 additions and 210 deletions

View File

@@ -1,3 +1,23 @@
macro_rules! ACCOUNT_STRING {
() => {
r#"Can be:
* a bs58 pubkey string
* path to keypair file
* '-' to take json-encoded keypair string from stdin
* 'ASK' to ask for a passphrase
* path to hardware wallet (usb://..)"#
};
}
#[macro_use]
macro_rules! pubkey {
($arg:expr, $help:expr) => {
$arg.takes_value(true)
.validator(is_valid_pubkey)
.help(concat!($help, ACCOUNT_STRING!()))
};
}
pub mod cli;
pub mod cluster_query;
pub mod display;