From 56ce42228ca48c3d940ea01bce6c11bdfb498bce Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sat, 23 Nov 2024 01:03:00 +0100 Subject: rename files arg field, start rewriting run_editor fn --- 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 0a1c0b5..02fc8df 100644 --- a/src/cliargs.rs +++ b/src/cliargs.rs @@ -28,7 +28,7 @@ use walkdir::WalkDir; pub struct CLIArgs { pub helparg: bool, pub versionarg: bool, - pub pos_args: Vec, + pub fileargs: Vec, } impl CLIArgs { @@ -53,13 +53,13 @@ pub fn parse_files(args: &mut CLIArgs, pos_arg: OsString) { let path = PathBuf::from(pos_arg); // If pos arg is file, just push it to path vec if path.is_file() { - args.pos_args.push(path); + args.fileargs.push(path); // If pos arg is dir, walk dir and collect bibfiles } else if path.is_dir() { for file in WalkDir::new(path) { let f = file.unwrap().into_path(); if f.is_file() && f.extension().unwrap() == "bib" { - args.pos_args.push(f) + args.fileargs.push(f) } } } else { -- cgit v1.2.3