5

In taskwarrior there are some commands which need confirmirmation, like deleting more than 2 tasks or modify recurring tasks. I don't want to confirm every time and I have already set "confirmation off" in file .taskrc .

I'm using the subprocess module in python to invoke taskwarrior commands. I'm calling for example task del 1,2,3 and the shell waits now for a manual confirmation of the deletion request.

How can I avoid the manual confirmation?

OBu
  • 4,977
  • 3
  • 29
  • 45
Jighen
  • 81
  • 5

3 Answers3

3

You should add confirmation=no to ~/.taskrc.

Here's a one-liner to do that:

echo confirmation=no >> ~/.taskrc
oldhomemovie
  • 14,621
  • 13
  • 64
  • 99
1

already added confirmation=no to ~/.taskrc

a possible answer to the question could be

echo 'all' | task del 1,2,3

but there could be a better one

Jighen
  • 81
  • 5
1

To disable confirmations entirely, I have the following in my taskrc:

# no confirmation on bulk actions
confirmation=off
bulk=0

This command will remove tasks 1, 2 and 3 without asking for confirmation:

$ task rc.bulk=0 rc.confirmation=off 1-3 delete
Matt
  • 8,758
  • 4
  • 35
  • 64