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:
Neal H. Walfield 2024-11-18 10:29:41 +01:00
parent cef1542ee4
commit 7d44c8e3d5
No known key found for this signature in database
GPG Key ID: 6863C9AD5B4D22D3

View File

@ -434,31 +434,6 @@ The specified user ID must be self signed."));
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 {
let full_name = "userid";
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);
}
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 {
let full_name = "userid-or-add";
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);
}
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 {
let full_name = "email-or-add";
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);
}
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 {
let full_name = "name-or-add";
cmd = cmd.arg(