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/app.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index 977cb6c..c60d81e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -16,6 +16,7 @@ ///// use crate::bibiman::{CurrentArea, FormerArea}; +use crate::config::BibiConfig; use color_eyre::eyre::{Context, Ok, Result}; // use super::Event; use crate::cliargs::CLIArgs; @@ -46,11 +47,11 @@ pub struct App { impl App { // Constructs a new instance of [`App`]. - pub fn new(args: &CLIArgs) -> Result { + pub fn new(args: &mut CLIArgs, cfg: &mut BibiConfig) -> Result { // Self::default() let running = true; let input = Input::default(); - let bibiman = Bibiman::new(args)?; + let bibiman = Bibiman::new(args, cfg)?; Ok(Self { running, bibiman, -- cgit v1.2.3