fix: arg parsing
The 'pacdef group import' argument was called 'files', while we expected it to be called 'groups'.
This commit is contained in:
@@ -35,7 +35,7 @@ fn get_group_cmd() -> Command {
|
|||||||
.about("import one or more group files")
|
.about("import one or more group files")
|
||||||
.arg_required_else_help(true)
|
.arg_required_else_help(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("files")
|
Arg::new("groups")
|
||||||
.num_args(1..)
|
.num_args(1..)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("the file to import as group"),
|
.help("the file to import as group"),
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ fn get_edit(args: &clap::ArgMatches) -> Edit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_groups(args: &clap::ArgMatches) -> Groups {
|
fn get_groups(args: &clap::ArgMatches) -> Groups {
|
||||||
|
dbg!(&args);
|
||||||
Groups(
|
Groups(
|
||||||
args.get_many::<String>("groups")
|
args.get_many::<String>("groups")
|
||||||
.expect(ARGS_CONSISTENT)
|
.expect(ARGS_CONSISTENT)
|
||||||
|
|||||||
Reference in New Issue
Block a user