From cb92d2ac8a7e014eac28ddf9ad1e6500b840739f Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 27 Nov 2024 09:42:37 +0000 Subject: feat(account): move login/out cmds to account move login, logout export-keys commands to sub commands under account --- src/bin/ngit/cli.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index fce5664..851dd70 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -57,8 +57,6 @@ pub enum Commands { Fetch(sub_commands::fetch::SubCommandArgs), /// signal you are this repo's maintainer accepting proposals via nostr Init(sub_commands::init::SubCommandArgs), - /// export nostr keys to login to other nostr clients - ExportKeys, /// issue commits as a proposal Send(sub_commands::send::SubCommandArgs), /// list proposals; checkout, apply or download selected @@ -67,8 +65,22 @@ pub enum Commands { Push(sub_commands::push::SubCommandArgs), /// fetch and apply new proposal commits / revisions linked to branch Pull, + /// login, logout or export keys + Account(AccountSubCommandArgs), +} + +#[derive(Subcommand)] +pub enum AccountCommands { /// run with --nsec flag to change npub Login(sub_commands::login::SubCommandArgs), /// remove nostr account details stored in git config Logout, + /// export nostr keys to login to other nostr clients + ExportKeys, +} + +#[derive(clap::Parser)] +pub struct AccountSubCommandArgs { + #[command(subcommand)] + pub account_command: AccountCommands, } -- cgit v1.2.3