Skip to content

Commit

Permalink
warning and double confirm for purge cmd about subtasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jfding committed Sep 22, 2024
1 parent 174127d commit 7986787
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ fn main() {
if inquire::Confirm::new("are you sure?")
.with_default(false)
.prompt().unwrap_or(false) {
if sort {
if ! inquire::Confirm::new("Sort can only work well without subtasks, continue?")
.with_default(false).prompt().unwrap_or(false) { return }
}

let mut todo = TaskBox::new(inbox_path);
todo.purge(sort);
Expand Down

0 comments on commit 7986787

Please sign in to comment.