diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-12 10:24:11 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-12 10:24:11 +0000 |
| commit | 116ab6757ef22779b913a5e1c5e289ba7f3daefb (patch) | |
| tree | 3418acd28e8e050f33bbf14aaf36eab4a6ed7cee /src/bin/ngit/cli.rs | |
| parent | bc6be27ae6d1d2befe0027c19aba3f6cd2d22535 (diff) | |
feat: make ngit list non-interactive by default
- Add --status flag for filtering (default: open,draft)
- Add --json flag for JSON output
- Add optional <id> argument for showing proposal details
- Rename interactive logic to launch_interactive()
- Non-interactive mode outputs table format by default
- Use -i flag for interactive mode
Phase 3 of non-interactive ngit list implementation.
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 8f55274..dd7196c 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs | |||
| @@ -105,7 +105,16 @@ pub enum Commands { | |||
| 105 | /// submit PR with advanced options | 105 | /// submit PR with advanced options |
| 106 | Send(sub_commands::send::SubCommandArgs), | 106 | Send(sub_commands::send::SubCommandArgs), |
| 107 | /// list PRs; checkout, apply or download selected | 107 | /// list PRs; checkout, apply or download selected |
| 108 | List, | 108 | List { |
| 109 | /// Filter by status (comma-separated: open,draft,closed,applied) | ||
| 110 | #[arg(long, default_value = "open,draft")] | ||
| 111 | status: String, | ||
| 112 | /// Output as JSON | ||
| 113 | #[arg(long)] | ||
| 114 | json: bool, | ||
| 115 | /// Show details for specific proposal (event-id or nevent) | ||
| 116 | id: Option<String>, | ||
| 117 | }, | ||
| 109 | /// checkout a proposal branch by event-id or nevent | 118 | /// checkout a proposal branch by event-id or nevent |
| 110 | Checkout { | 119 | Checkout { |
| 111 | /// Proposal event-id (hex) or nevent (bech32) | 120 | /// Proposal event-id (hex) or nevent (bech32) |