diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-11 16:52:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-11 17:07:01 +0000 |
| commit | fccfd5135818acc9ebcdac45ecb5ff4060d161dc (patch) | |
| tree | 87a3f4f16bd4b93682fd3bc4691f8eae423f8578 /src/bin/ngit/main.rs | |
| parent | 9cd4971c15fa990dd58ef0989b218a50c2d9c275 (diff) | |
fix: force interactive mode for list command
The list command is inherently interactive - it presents menus for
browsing and selecting proposals. Without interactive mode, all
choice() calls auto-select default index 0, causing the first
proposal to be checked out immediately without user input.
Diffstat (limited to 'src/bin/ngit/main.rs')
| -rw-r--r-- | src/bin/ngit/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index 5d29b02..b6b51d0 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs | |||
| @@ -45,7 +45,12 @@ async fn main() { | |||
| 45 | } | 45 | } |
| 46 | }, | 46 | }, |
| 47 | Commands::Init(args) => sub_commands::init::launch(&cli, args).await, | 47 | Commands::Init(args) => sub_commands::init::launch(&cli, args).await, |
| 48 | Commands::List => sub_commands::list::launch().await, | 48 | Commands::List => { |
| 49 | // list is inherently interactive - it presents menus for | ||
| 50 | // browsing and selecting proposals | ||
| 51 | std::env::set_var("NGIT_INTERACTIVE_MODE", "1"); | ||
| 52 | sub_commands::list::launch().await | ||
| 53 | } | ||
| 49 | Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await, | 54 | Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await, |
| 50 | Commands::Sync(args) => sub_commands::sync::launch(args).await, | 55 | Commands::Sync(args) => sub_commands::sync::launch(args).await, |
| 51 | } | 56 | } |