diff options
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 16 |
1 files changed, 14 insertions, 2 deletions
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 { | |||
| 57 | Fetch(sub_commands::fetch::SubCommandArgs), | 57 | Fetch(sub_commands::fetch::SubCommandArgs), |
| 58 | /// signal you are this repo's maintainer accepting proposals via nostr | 58 | /// signal you are this repo's maintainer accepting proposals via nostr |
| 59 | Init(sub_commands::init::SubCommandArgs), | 59 | Init(sub_commands::init::SubCommandArgs), |
| 60 | /// export nostr keys to login to other nostr clients | ||
| 61 | ExportKeys, | ||
| 62 | /// issue commits as a proposal | 60 | /// issue commits as a proposal |
| 63 | Send(sub_commands::send::SubCommandArgs), | 61 | Send(sub_commands::send::SubCommandArgs), |
| 64 | /// list proposals; checkout, apply or download selected | 62 | /// list proposals; checkout, apply or download selected |
| @@ -67,8 +65,22 @@ pub enum Commands { | |||
| 67 | Push(sub_commands::push::SubCommandArgs), | 65 | Push(sub_commands::push::SubCommandArgs), |
| 68 | /// fetch and apply new proposal commits / revisions linked to branch | 66 | /// fetch and apply new proposal commits / revisions linked to branch |
| 69 | Pull, | 67 | Pull, |
| 68 | /// login, logout or export keys | ||
| 69 | Account(AccountSubCommandArgs), | ||
| 70 | } | ||
| 71 | |||
| 72 | #[derive(Subcommand)] | ||
| 73 | pub enum AccountCommands { | ||
| 70 | /// run with --nsec flag to change npub | 74 | /// run with --nsec flag to change npub |
| 71 | Login(sub_commands::login::SubCommandArgs), | 75 | Login(sub_commands::login::SubCommandArgs), |
| 72 | /// remove nostr account details stored in git config | 76 | /// remove nostr account details stored in git config |
| 73 | Logout, | 77 | Logout, |
| 78 | /// export nostr keys to login to other nostr clients | ||
| 79 | ExportKeys, | ||
| 80 | } | ||
| 81 | |||
| 82 | #[derive(clap::Parser)] | ||
| 83 | pub struct AccountSubCommandArgs { | ||
| 84 | #[command(subcommand)] | ||
| 85 | pub account_command: AccountCommands, | ||
| 74 | } | 86 | } |