From cff8bfadd3b28887e6f0625f2672e0ffcb039f67 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 16 Feb 2026 22:16:28 +0000 Subject: Show active filter in ngit list output Users may not be aware that ngit list defaults to filtering by open,draft status. Display the active filter at the top of the output to make this clear. --- src/bin/ngit/sub_commands/list.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/bin') diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs index 0750ce0..76220d9 100644 --- a/src/bin/ngit/sub_commands/list.rs +++ b/src/bin/ngit/sub_commands/list.rs @@ -205,7 +205,7 @@ pub async fn launch(status: String, json: bool, id: Option) -> Result<() if json { output_json(&filtered_proposals, &repo_ref)?; } else { - output_table(&filtered_proposals, &repo_ref); + output_table(&filtered_proposals, &repo_ref, &status); } Ok(()) @@ -221,9 +221,9 @@ fn status_kind_to_str(kind: Kind) -> &'static str { } } -fn output_table(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef) { +fn output_table(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef, status_filter: &str) { if proposals.is_empty() { - println!("No proposals found matching the filter."); + println!("No proposals found matching status: {status_filter}"); return; } @@ -242,6 +242,7 @@ fn output_table(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef) { } println!(); + println!("--status {status_filter}"); println!("To view: ngit list "); println!("To checkout: ngit checkout "); println!("To apply: ngit apply "); -- cgit v1.2.3