From d443843d352d740b895c4d622eb9af9567aa7423 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Mon, 17 Feb 2025 20:55:46 +0100 Subject: improve file handling + If config file **and** CLI args have different files/dirs, concat them and open all + Adapt UI to show which files are choosen + TODO: Flag for ignoring config file --- src/cliargs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cliargs.rs') diff --git a/src/cliargs.rs b/src/cliargs.rs index ecec93e..50ed6f5 100644 --- a/src/cliargs.rs +++ b/src/cliargs.rs @@ -31,7 +31,7 @@ pub struct CLIArgs { pub helparg: bool, pub versionarg: bool, pub pos_args: Vec, - pub files: Vec, + // pub files: Vec, pub cfg_path: PathBuf, // INFO: AppColors struct later should be moved to config/app struct // when config file is implemented @@ -65,7 +65,7 @@ impl CLIArgs { } } - args.files = parse_files(args.pos_args.clone()); + // args.files = parse_files(args.pos_args.clone()); Ok(args) } @@ -74,7 +74,7 @@ impl CLIArgs { /// This function maps a vector containing paths to another vector containing paths. /// But it will walk all entries of the first vec which are directories /// and put only valid file paths with `.bib` ending to the resulting vec. -fn parse_files(args: Vec) -> Vec { +pub fn parse_files(args: Vec) -> Vec { let mut files: Vec = Vec::new(); // If pos arg is file, just push it to path vec for i in args { -- cgit v1.2.3