aboutsummaryrefslogtreecommitdiff
path: root/src/cliargs.rs
diff options
context:
space:
mode:
authorlukeflo2025-02-17 20:55:46 +0100
committerlukeflo2025-02-17 20:55:46 +0100
commitd443843d352d740b895c4d622eb9af9567aa7423 (patch)
tree5b61ec01b2d54461c423b97e2a702e7ec7daded9 /src/cliargs.rs
parent059591a1be6b887eaca9b114fdb5b350a65bae43 (diff)
downloadbibiman-d443843d352d740b895c4d622eb9af9567aa7423.tar.gz
bibiman-d443843d352d740b895c4d622eb9af9567aa7423.zip
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
Diffstat (limited to 'src/cliargs.rs')
-rw-r--r--src/cliargs.rs6
1 files changed, 3 insertions, 3 deletions
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<PathBuf>,
- pub files: Vec<PathBuf>,
+ // pub files: Vec<PathBuf>,
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<PathBuf>) -> Vec<PathBuf> {
+pub fn parse_files(args: Vec<PathBuf>) -> Vec<PathBuf> {
let mut files: Vec<PathBuf> = Vec::new();
// If pos arg is file, just push it to path vec
for i in args {