cli: Add --confirmed option to a couple commands, also add --no-header (#7112)
* Add --confirmed option to get-slot, get-epoch-info, get-transaction-count * Add --no-header option
This commit is contained in:
@@ -133,12 +133,15 @@ pub fn parse_args(matches: &ArgMatches<'_>) -> Result<CliConfig, Box<dyn error::
|
||||
(default.keypair, None)
|
||||
};
|
||||
|
||||
let print_header = !matches.is_present("no_header");
|
||||
|
||||
Ok(CliConfig {
|
||||
command,
|
||||
json_rpc_url,
|
||||
keypair,
|
||||
keypair_path,
|
||||
rpc_client: None,
|
||||
print_header,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -182,6 +185,12 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
.takes_value(true)
|
||||
.help("/path/to/id.json"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_header")
|
||||
.long("no-header")
|
||||
.global(true)
|
||||
.help("Disable information header"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name(ASK_SEED_PHRASE_ARG.name)
|
||||
.long(ASK_SEED_PHRASE_ARG.long)
|
||||
|
Reference in New Issue
Block a user