From e4664354bf07b2d57c38472a6d25a9e5884f7e13 Mon Sep 17 00:00:00 2001 From: Joe Abbate Date: Thu, 3 Mar 2022 20:17:20 -0500 Subject: [PATCH] Add Colors --- src/commands/list.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/list.rs b/src/commands/list.rs index 533337a..b130bb8 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs @@ -46,8 +46,8 @@ pub fn list(matches: &ArgMatches<'_>, api: &mut API) -> Result<(), Box return Err(Box::new(APIError::BadFormat)), }; let subject_line = format!("{} ({})", display_name, name); - println!("{}", &subject_line); - println!("{}", "=".repeat(subject_line.len())); + println!("\n\x1B[36m{}\x1B[0m", &subject_line); + println!("\x1B[36m{}\x1B[0m", "=".repeat(subject_line.len())); let slots: &Vec = match machine["slots"].as_array() { Some(slots) => slots, None => return Err(Box::new(APIError::BadFormat)), @@ -66,9 +66,10 @@ pub fn list(matches: &ArgMatches<'_>, api: &mut API) -> Result<(), Box