From ced4acd3b849e21d913da2ec5861428484ca9ddf Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Fri, 12 Apr 2024 10:02:55 +0100 Subject: [PATCH] feat: better confirmation before deleting --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 840cb06..5908230 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,12 +36,12 @@ fn confirm_parse() { } fn confirm_once() { - print!("Are you sure you want to delete the specified targets? [y/N]: "); + print!("Delete the specified targets? [y/N]: "); confirm_parse(); } fn confirm_each(target: &String) { - print!("Are you sure you want to delete {} ? [y/N]: ", target.bold()); + print!("Delete {} ? [y/N]: ", target.bold()); confirm_parse(); } @@ -58,10 +58,14 @@ fn vaporise() -> Result<()> { } if args.ask_once { + println!(); + for target in args.targets.iter() { + println!(" {}", target.bold()); + } + println!(); confirm_once(); } - let root: &str; if cfg!(windows) { root = "C:\\";