decompressors/zip: Add confirmation dialog for file overwriting
[ouch.git] / src / main.rs
bloba13504f6d2f9e89cc020d74d90c72c8230d95c6f
1 mod cli;
2 mod compressors;
3 mod decompressors;
4 mod dialogs;
5 mod error;
6 mod evaluator;
7 mod extension;
8 mod file;
9 mod test;
10 mod utils;
12 use std::convert::TryFrom;
14 use error::{Error, Result};
15 use evaluator::Evaluator;
17 fn main() -> crate::Result<()> {
18     let matches = cli::get_matches();
19     let command = cli::Command::try_from(matches)?;
20     Evaluator::evaluate(command)
23 // fn main() -> crate::Result<()> {
24 //     let dialog = dialogs::Confirmation::new("Do you want to overwrite 'FILE'?", Some("FILE"));
26 //     match dialog.ask(Some("file.tar.gz"))? {
27 //         true => println!("deleting"),
28 //         false => println!("keeping")
29 //     };
31 //     Ok(())
32 // }