From 10398899176fbdee2ba4714a711e9224774a8473 Mon Sep 17 00:00:00 2001 From: Michael Scholten Date: Thu, 21 Sep 2023 13:52:06 +0200 Subject: [PATCH] Added colors for help menu --- src/args.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/args.rs b/src/args.rs index dc1207e..cbbfb8d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -1,10 +1,19 @@ -use clap::Parser; +use clap::{ + builder::{styling::AnsiColor, Styles}, + Parser, +}; const ABOUT: &str = "A command line music radio client for https://coderadio.freecodecamp.org GitHub: https://github.com/JasonWei512/code-radio-cli"; +const STYLE: Styles = Styles::styled() + .header(AnsiColor::Yellow.on_default()) + .usage(AnsiColor::Yellow.on_default()) + .literal(AnsiColor::Green.on_default()) + .placeholder(AnsiColor::Green.on_default()); + #[derive(Parser, Debug)] -#[clap(author, version, about = ABOUT)] +#[clap(author, version, about = ABOUT, styles = STYLE)] pub struct Args { /// Manually select a station #[clap(short, long)]