aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorlukeflo2025-02-17 20:55:46 +0100
committerlukeflo2025-02-17 20:55:46 +0100
commitd443843d352d740b895c4d622eb9af9567aa7423 (patch)
tree5b61ec01b2d54461c423b97e2a702e7ec7daded9 /src/app.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/app.rs')
-rw-r--r--src/app.rs5
1 files changed, 3 insertions, 2 deletions
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<Self> {
+ pub fn new(args: &mut CLIArgs, cfg: &mut BibiConfig) -> Result<Self> {
// Self::default()
let running = true;
let input = Input::default();
- let bibiman = Bibiman::new(args)?;
+ let bibiman = Bibiman::new(args, cfg)?;
Ok(Self {
running,
bibiman,