Skip to content

Commit

Permalink
Change aliases arg
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Dec 6, 2023
1 parent 0d1cd93 commit 978ca89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,7 @@ pub mod args {
pub const ALIAS_OPT: ArgOpt<String> = ALIAS.opt();
pub const ALIAS: Arg<String> = arg("alias");
pub const ALIAS_FORCE: ArgFlag = flag("alias-force");
pub const ALIAS_MANY: ArgMulti<String> = arg_multi("alias");
pub const ALIAS_MANY: ArgMulti<String> = arg_multi("aliases");
pub const ALLOW_DUPLICATE_IP: ArgFlag = flag("allow-duplicate-ip");
pub const AMOUNT: Arg<token::DenominatedAmount> = arg("amount");
pub const ARCHIVE_DIR: ArgOpt<PathBuf> = arg_opt("archive-dir");
Expand Down Expand Up @@ -6822,11 +6822,10 @@ pub mod args {
}

fn def(app: App) -> App {
app.arg(
ALIAS_MANY
.def()
.help("The aliases of the keys to use from the wallet."),
)
app.arg(ALIAS_MANY.def().help(
"Comma separated list of aliases of the keys to use from the \
wallet.",
))
.arg(THRESOLD.def().help(
"The minimum number of signatures to be provided for \
authorization. Must be less than or equal to the maximum \
Expand Down
3 changes: 2 additions & 1 deletion apps/src/lib/cli/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ where
pub fn def(&self) -> ClapArg {
ClapArg::new(self.name)
.long(self.name)
.action(ArgAction::Append)
.num_args(1..)
.value_delimiter(',')
}

pub fn parse(&self, matches: &ArgMatches) -> Vec<T> {
Expand Down

0 comments on commit 978ca89

Please sign in to comment.