Rearrange the order of the user ID designator arguments.
- Rearrange the order of the user ID designators arguments so that the help output is easier to scan. Specifically, move `--userid-or-add` immediately after `--userid`, `--email-or-add` immediately after `--email`, and `--name-or-add` immediately after `--name`.
This commit is contained in:
parent
cef1542ee4
commit
7d44c8e3d5
@ -434,31 +434,6 @@ The specified user ID must be self signed."));
|
|||||||
arg_group = arg_group.arg(full_name);
|
arg_group = arg_group.arg(full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if email_arg {
|
|
||||||
let full_name = "email";
|
|
||||||
cmd = cmd.arg(
|
|
||||||
clap::Arg::new(&full_name)
|
|
||||||
.long(&full_name)
|
|
||||||
.value_name("EMAIL")
|
|
||||||
.value_parser(parse_as_email)
|
|
||||||
.action(action.clone())
|
|
||||||
.help("\
|
|
||||||
Use the self-signed user ID with the specified email address"));
|
|
||||||
arg_group = arg_group.arg(full_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if name_arg {
|
|
||||||
let full_name = "name";
|
|
||||||
cmd = cmd.arg(
|
|
||||||
clap::Arg::new(&full_name)
|
|
||||||
.long(&full_name)
|
|
||||||
.value_name("DISPLAY_NAME")
|
|
||||||
.action(action.clone())
|
|
||||||
.help("\
|
|
||||||
Use the self-signed user ID with the specified display name"));
|
|
||||||
arg_group = arg_group.arg(full_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if any_userid_arg {
|
if any_userid_arg {
|
||||||
let full_name = "userid";
|
let full_name = "userid";
|
||||||
cmd = cmd.arg(
|
cmd = cmd.arg(
|
||||||
@ -474,43 +449,6 @@ The specified user ID does not need to be self signed."));
|
|||||||
arg_group = arg_group.arg(full_name);
|
arg_group = arg_group.arg(full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if any_email_arg {
|
|
||||||
let full_name = "email";
|
|
||||||
cmd = cmd.arg(
|
|
||||||
clap::Arg::new(&full_name)
|
|
||||||
.long(&full_name)
|
|
||||||
.value_name("EMAIL")
|
|
||||||
.value_parser(parse_as_email)
|
|
||||||
.action(action.clone())
|
|
||||||
.help("\
|
|
||||||
Use a user ID with the specified email address")
|
|
||||||
.long_help("\
|
|
||||||
Use a user ID with the specified email address.
|
|
||||||
|
|
||||||
This first searches for a matching self-signed user ID. If there is \
|
|
||||||
no self-signed user ID with the specified email, it uses a new user ID \
|
|
||||||
with the specified email address, and no display name."));
|
|
||||||
arg_group = arg_group.arg(full_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if any_name_arg {
|
|
||||||
let full_name = "name";
|
|
||||||
cmd = cmd.arg(
|
|
||||||
clap::Arg::new(&full_name)
|
|
||||||
.long(&full_name)
|
|
||||||
.value_name("DISPLAY_NAME")
|
|
||||||
.action(action.clone())
|
|
||||||
.help("\
|
|
||||||
Use a user ID with the specified display name")
|
|
||||||
.long_help("\
|
|
||||||
Use a user ID with the specified display name.
|
|
||||||
|
|
||||||
This first searches for a matching self-signed user ID. If there is \
|
|
||||||
no self-signed user ID with the specified name, it uses a new user ID \
|
|
||||||
with the specified display name, and no email address."));
|
|
||||||
arg_group = arg_group.arg(full_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if add_userid_arg {
|
if add_userid_arg {
|
||||||
let full_name = "userid-or-add";
|
let full_name = "userid-or-add";
|
||||||
cmd = cmd.arg(
|
cmd = cmd.arg(
|
||||||
@ -532,6 +470,38 @@ you can add a petname, i.e., a memorable, personal name like \"mom\"."));
|
|||||||
arg_group = arg_group.arg(full_name);
|
arg_group = arg_group.arg(full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if email_arg {
|
||||||
|
let full_name = "email";
|
||||||
|
cmd = cmd.arg(
|
||||||
|
clap::Arg::new(&full_name)
|
||||||
|
.long(&full_name)
|
||||||
|
.value_name("EMAIL")
|
||||||
|
.value_parser(parse_as_email)
|
||||||
|
.action(action.clone())
|
||||||
|
.help("\
|
||||||
|
Use the self-signed user ID with the specified email address"));
|
||||||
|
arg_group = arg_group.arg(full_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if any_email_arg {
|
||||||
|
let full_name = "email";
|
||||||
|
cmd = cmd.arg(
|
||||||
|
clap::Arg::new(&full_name)
|
||||||
|
.long(&full_name)
|
||||||
|
.value_name("EMAIL")
|
||||||
|
.value_parser(parse_as_email)
|
||||||
|
.action(action.clone())
|
||||||
|
.help("\
|
||||||
|
Use a user ID with the specified email address")
|
||||||
|
.long_help("\
|
||||||
|
Use a user ID with the specified email address.
|
||||||
|
|
||||||
|
This first searches for a matching self-signed user ID. If there is \
|
||||||
|
no self-signed user ID with the specified email, it uses a new user ID \
|
||||||
|
with the specified email address, and no display name."));
|
||||||
|
arg_group = arg_group.arg(full_name);
|
||||||
|
}
|
||||||
|
|
||||||
if add_email_arg {
|
if add_email_arg {
|
||||||
let full_name = "email-or-add";
|
let full_name = "email-or-add";
|
||||||
cmd = cmd.arg(
|
cmd = cmd.arg(
|
||||||
@ -550,6 +520,36 @@ user ID with the specified email address, and no display name."));
|
|||||||
arg_group = arg_group.arg(full_name);
|
arg_group = arg_group.arg(full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if name_arg {
|
||||||
|
let full_name = "name";
|
||||||
|
cmd = cmd.arg(
|
||||||
|
clap::Arg::new(&full_name)
|
||||||
|
.long(&full_name)
|
||||||
|
.value_name("DISPLAY_NAME")
|
||||||
|
.action(action.clone())
|
||||||
|
.help("\
|
||||||
|
Use the self-signed user ID with the specified display name"));
|
||||||
|
arg_group = arg_group.arg(full_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if any_name_arg {
|
||||||
|
let full_name = "name";
|
||||||
|
cmd = cmd.arg(
|
||||||
|
clap::Arg::new(&full_name)
|
||||||
|
.long(&full_name)
|
||||||
|
.value_name("DISPLAY_NAME")
|
||||||
|
.action(action.clone())
|
||||||
|
.help("\
|
||||||
|
Use a user ID with the specified display name")
|
||||||
|
.long_help("\
|
||||||
|
Use a user ID with the specified display name.
|
||||||
|
|
||||||
|
This first searches for a matching self-signed user ID. If there is \
|
||||||
|
no self-signed user ID with the specified name, it uses a new user ID \
|
||||||
|
with the specified display name, and no email address."));
|
||||||
|
arg_group = arg_group.arg(full_name);
|
||||||
|
}
|
||||||
|
|
||||||
if add_name_arg {
|
if add_name_arg {
|
||||||
let full_name = "name-or-add";
|
let full_name = "name-or-add";
|
||||||
cmd = cmd.arg(
|
cmd = cmd.arg(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user