upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-16 22:25:29 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-17 11:38:22 +0000
commit17d31258117ec51d0e79c488ed8f863ad47b945f (patch)
tree2d05e27dac06f45fb76f61f2f9e77e8e1be9e7d8 /src/bin/ngit
parentcff8bfadd3b28887e6f0625f2672e0ffcb039f67 (diff)
style: make hint lines yellow in ngit list output
Use console::style().yellow() for 'To view/checkout/apply' hints to match git CLI hint styling.
Diffstat (limited to 'src/bin/ngit')
-rw-r--r--src/bin/ngit/sub_commands/list.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs
index 76220d9..fc0883a 100644
--- a/src/bin/ngit/sub_commands/list.rs
+++ b/src/bin/ngit/sub_commands/list.rs
@@ -243,9 +243,15 @@ fn output_table(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef, status
243 243
244 println!(); 244 println!();
245 println!("--status {status_filter}"); 245 println!("--status {status_filter}");
246 println!("To view: ngit list <id>"); 246 println!("{}", console::style("To view: ngit list <id>").yellow());
247 println!("To checkout: ngit checkout <id>"); 247 println!(
248 println!("To apply: ngit apply <id>"); 248 "{}",
249 console::style("To checkout: ngit checkout <id>").yellow()
250 );
251 println!(
252 "{}",
253 console::style("To apply: ngit apply <id>").yellow()
254 );
249} 255}
250 256
251fn output_json(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef) -> Result<()> { 257fn output_json(proposals: &[(&nostr::Event, Kind)], _repo_ref: &RepoRef) -> Result<()> {
@@ -344,8 +350,14 @@ fn show_proposal_details(
344 } 350 }
345 351
346 println!(); 352 println!();
347 println!("To checkout: ngit checkout {}", proposal.id); 353 println!(
348 println!("To apply: ngit apply {}", proposal.id); 354 "{}",
355 console::style(format!("To checkout: ngit checkout {}", proposal.id)).yellow()
356 );
357 println!(
358 "{}",
359 console::style(format!("To apply: ngit apply {}", proposal.id)).yellow()
360 );
349 361
350 Ok(()) 362 Ok(())
351} 363}