conditional-statementsfilteringtaskwarrior

taskwarrior conditional in filter


Does anyone know if a conditional (such as 'not') can be applied in a taskwarrior filter.

I want to list all tasks except for the ones related to one project.

Say I have projects A thru F, I want all tasks except the ones from project C. It looks like this is possible with tags (using a negative sign) but I cannot get it to work for projects.


Solution

  • You can use the ".not" modifier on any of the TaskWarrior filters, which flips the selection of tasks. Typing

    task project:C
    

    would select all the tasks in project C, so:

    task project.not:C
    

    selects all tasks not in project C.