From bb6f07dfb252eb74766051a750b9ae2696069bd5 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Thu, 28 Nov 2024 17:56:04 +0100 Subject: color struct impl, integrated with cliargs --- src/cliargs.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/cliargs.rs') diff --git a/src/cliargs.rs b/src/cliargs.rs index 3ac8616..d6c27c4 100644 --- a/src/cliargs.rs +++ b/src/cliargs.rs @@ -22,6 +22,8 @@ use std::env; use std::path::PathBuf; use walkdir::WalkDir; +use crate::tui::colors::AppColors; + // struct for CLIArgs #[derive(Debug, Default, Clone)] pub struct CLIArgs { @@ -29,6 +31,7 @@ pub struct CLIArgs { pub versionarg: bool, pub pos_args: Vec, pub files: Vec, + pub colors: AppColors, } impl CLIArgs { @@ -40,6 +43,7 @@ impl CLIArgs { match arg { Short('h') | Long("help") => args.helparg = true, Short('v') | Long("version") => args.versionarg = true, + Long("light-theme") => AppColors::light_colors(&mut args.colors), // Value(pos_arg) => parse_files(&mut args, pos_arg), Value(pos_arg) => args.pos_args.push(pos_arg.into()), _ => return Err(arg.unexpected()), -- cgit v1.2.3