These are very minor changes, but should help the sub-commands and various flags make some more sense! :^)
SAJU2DYI55I6XLB7HFBVCWKP3R33MLAJ5BPJEOPUXCXQXKLJAPIAC
XQRMRGCCJ3JBZDXTLSENWCOS2V4D4DHTDW46DYXHKALJDQ7B4AEAC
NE6CQKFXE4EHODG5M3P4OK5O2ICHPAXCNWSRIHB35BY5Q6RYXSGAC
L75UNYXJBN5AG4DFRUJZWL7ZXSALDRPWSR27FZUQY5EH5EWE5AFAC
SBEWZIUAK6UO3GOJGFABJJYOKXU23QRZJEARMT2VYODBG5QGZGDAC
WDGN6ZDCAOWWCMRLDEUP2563ZPBJABG5OEUXAKQLVXUR2UZKXAXQC
UVEP3FDB4TS7JB7RQCUZGTW652H4EV2FC5YPWIJWARRSE44CQ7EQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
3YJWXVMK5Y5JHH652RQLPBXO5VHYRNCFPGJI327K4WFXZNBPM6NQC
574FXSXKJF6OVHKHGIFKRFNJOR6URJ23JSQQ47YGMN7XGRXDCSGAC
4HALNYMMAQZ6HDUWNWX7RUK5RC7RURQUJDVS3J5PO73ECL3BW74QC
H2SE4OTIMSJDIPOE6KRLDLTT2IAACTNYX2NTUGRCWBY4NYQ5C7MQC
XVQRCKUXUCPTZZ6HEPHWF6H7PXFPVWQHW7DL2VQAFHNGOIPYH6PAC
YQLVP7CHQKIQCKQFRNI5RHSEBHLXXMRQI662MEXXBE5S63H5XC7AC
DQBU7RTXOEZ7D3SR23PPKLGL2PUAG6AEO5E4Z3SV3WMQUYDTRH2AC
HCWNO2AR7JWCCMWE3MTW4N7PLUSFBPFJXAHUXBBUIO657GCWQL6AC
EEI2PN4NL622EJMAASO4QCJILWZPQ6DC2HSVVAUDZRFCNFGKZKUAC
O4T3BTWIMLZBEPSUAW2L7HQUO4YZQGEEXZNY3CLBIYI4H72WBY2QC
YYNQ2OCD5YBF2PM52RPR2W5YUMFGYYW5NBKVPQRZPD7UG4R43GYAC
UDA64KWPJLKKIY2PUZE7GQGMR5TONMRNHH54MLJOJEDCGKRDX6TQC
/// A collection of commands to aid in managing the user's identity.
/// This replaces the deprecated `pijul key` command.
/// A collection of tools for interactively managing the user's identities.
/// This may be useful if you use Pijul in multiple contexts, for example
/// both work & personal projects.
/// Set the name used to create the identity
#[clap(long = "name", group("name"), value_parser = name_does_not_exist)]
pub identity_name: Option<String>,
/// If enabled, the program should not automatically prove the identity with given remote details
#[clap(long = "no-link")]
/// Do not automatically link keys with the remote
#[clap(long = "no-link", display_order = 1)]
/// If enabled, the program should never prompt the user. If information is missing, the program will
/// list the missing information and then exit.
#[clap(long = "no-prompt", requires("name"))]
/// Abort rather than prompt for input
#[clap(long = "no-prompt", requires("edit-data"), display_order = 1)]
/// If no-prompt is enabled, set the login used to create the identity
#[clap(long = "login")]
pub login: Option<String>,
/// If no-prompt is enabled, set the full name used to create the identity
#[clap(long = "full-name")]
pub full_name: Option<String>,
/// If no-prompt is enabled, set the origin used to create the identity
#[clap(long = "origin")]
pub origin: Option<String>,
/// If no-prompt is enabled, set the email used to create the identity
#[clap(long = "email", value_parser = validate_email)]
/// Set the username
#[clap(long = "username", display_order = 3)]
pub username: Option<String>,
/// Set the default remote
#[clap(long = "remote", display_order = 3)]
pub remote: Option<String>,
/// Set the display name
#[clap(long = "display-name", display_order = 3)]
pub display_name: Option<String>,
/// Set the email
#[clap(long = "email", value_parser = validate_email, display_order = 3)]
/// If no-prompt is enabled, set the expiry
#[clap(long = "expiry", value_parser = parse_expiry)]
/// Set the new identity name
#[clap(long = "name", value_parser = name_does_not_exist, display_order = 3)]
pub name: Option<String>,
/// Set the expiry
#[clap(long = "expiry", value_parser = parse_expiry, display_order = 3)]
/// If enabled, the program should never prompt the user. The program will exit if this is enabled
/// but no flags have been used to edit.
#[clap(long = "no-prompt", requires("name"), requires("edit-data"))]
/// Abort rather than prompt for input
#[clap(
long = "no-prompt",
requires("name"),
requires("edit-data"),
display_order = 1
)]
/// If no-prompt is enabled, set the new login
#[clap(long = "login")]
pub login: Option<String>,
/// If no-prompt is enabled, set the new origin
#[clap(long = "origin")]
pub origin: Option<String>,
/// If no-prompt is enabled, set the new full name
#[clap(long = "full-name")]
pub full_name: Option<String>,
/// If no-prompt is enabled, set new email
#[clap(long = "email", value_parser = validate_email)]
/// Set the username
#[clap(long = "username", display_order = 3)]
pub username: Option<String>,
/// Set the default remote
#[clap(long = "remote", display_order = 3)]
pub remote: Option<String>,
/// Set the display name
#[clap(long = "display-name", display_order = 3)]
pub display_name: Option<String>,
/// Set the email
#[clap(long = "email", value_parser = validate_email, display_order = 3)]
/// If enabled, the program will remove the matching identity without user confirmation.
#[clap(long = "no-prompt")]
no_prompt: bool,
/// Remove the matching identity without confirmation
#[clap(long = "no-confirm")]
no_confirm: bool,
/// If enabled, proving a key will not check for self-signed certificates in the certificate chain.
/// This is generally useful if you are behind a managed network, for example at work or school, and
/// Pijul is unable to perform network operations
/// Do not verify certificates (use with caution)
if identities.is_empty() {
let mut stderr = std::io::stderr();
writeln!(
stderr,
"No identities found. Use `pijul identity new` to create one."
)?;
writeln!(stderr, "If you have created a key in the past, you may need to migrate via `pijul identity repair`")?;