This commit is contained in:
2025-11-12 09:45:22 -07:00
parent ea28b852e6
commit 9e9e46fe26
5 changed files with 132 additions and 17 deletions

View File

@@ -1,10 +1,25 @@
mod app;
use std::env::args;
use crate::app::{app::App};
fn main() -> Result<(), std::io::Error> {
let args = args().collect::<Vec<String>>();
let mut app = if args.len() > 1 {
let file = &args[1];
match App::new_with_file(file) {
Ok(o) => o,
Err(e) => {
return Err(e);
},
}
} else {
App::new()
};
let term = ratatui::init();
let mut app = App::new();
let res = app.run(term);
ratatui::restore();
return res;