diff options
| author | lukeflo | 2024-11-28 17:56:04 +0100 |
|---|---|---|
| committer | lukeflo | 2024-11-28 17:56:04 +0100 |
| commit | bb6f07dfb252eb74766051a750b9ae2696069bd5 (patch) | |
| tree | af32e78e59f5208933ea77cbebc94518740483bc /src/cliargs.rs | |
| parent | 87eefb8248ccf71eb43fd817f18a18af9f5c9083 (diff) | |
| download | bibiman-bb6f07dfb252eb74766051a750b9ae2696069bd5.tar.gz bibiman-bb6f07dfb252eb74766051a750b9ae2696069bd5.zip | |
color struct impl, integrated with cliargs
Diffstat (limited to 'src/cliargs.rs')
| -rw-r--r-- | src/cliargs.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<PathBuf>, pub files: Vec<PathBuf>, + 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()), |
