aboutsummaryrefslogtreecommitdiff
path: root/src/cliargs.rs
diff options
context:
space:
mode:
authorlukeflo2024-11-23 01:03:00 +0100
committerlukeflo2024-11-23 01:03:00 +0100
commit56ce42228ca48c3d940ea01bce6c11bdfb498bce (patch)
tree10db6a6e1ac810263948e369db33f568130d541a /src/cliargs.rs
parente354e97facdf61abb20a06f5bae2bac5e86c2d62 (diff)
downloadbibiman-56ce42228ca48c3d940ea01bce6c11bdfb498bce.tar.gz
bibiman-56ce42228ca48c3d940ea01bce6c11bdfb498bce.zip
rename files arg field, start rewriting run_editor fn
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 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<PathBuf>,
+ pub fileargs: Vec<PathBuf>,
}
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 {