diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-05 10:58:37 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-05 10:58:37 +0000 |
| commit | 2f2819cc2365be07fedfd35ab3654b3607e29e76 (patch) | |
| tree | d59b4ce913500ae1c0b31ce0982c7756f3195a59 /src/bin/ngit/main.rs | |
| parent | 4d23e609ec3d6c25b5f5918fd317eef02a434efe (diff) | |
add `ngit account whoami` command
Shows currently logged-in account(s) with name and npub. When both a
local (repo-scoped) and global account are configured, displays both
with local marked as active. Supports --json (returns local, global,
and active objects each with name, npub, nip05, scope) and --offline
(reads from cache only, no network). Fixes doc_markdown clippy warning
in cli.rs.
Diffstat (limited to 'src/bin/ngit/main.rs')
| -rw-r--r-- | src/bin/ngit/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index 8f3b0da..6a5a8f0 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs | |||
| @@ -48,6 +48,9 @@ async fn main() { | |||
| 48 | AccountCommands::Create(sub_args) => { | 48 | AccountCommands::Create(sub_args) => { |
| 49 | sub_commands::create::launch(&cli, sub_args).await | 49 | sub_commands::create::launch(&cli, sub_args).await |
| 50 | } | 50 | } |
| 51 | AccountCommands::Whoami(sub_args) => { | ||
| 52 | sub_commands::whoami::launch(&cli, sub_args).await | ||
| 53 | } | ||
| 51 | }, | 54 | }, |
| 52 | Commands::Init(args) => sub_commands::init::launch(&cli, args).await, | 55 | Commands::Init(args) => sub_commands::init::launch(&cli, args).await, |
| 53 | Commands::Repo(args) => { | 56 | Commands::Repo(args) => { |