taskwarrior

Add an annotation with "add" command in Taskwarrior


Can I add an annotation to a task in Taskwarrior while creating it like that?

task add Description annotation:Anno

Normaly I have to do it with two commands

task add Description
task 1 annotate Anno

Solution

  • It is not possible with the add command as the documentation states:

    You cannot add annotations while creating a task because it interferes with the task description.

    A possible workaround would be a script asking for the annotation:

    #!/bin/bash
    
    set -e
    
    task add $@
    ID=$(task +LATEST ids)
    read -p "Annotation: " ANNOTATION
    task $ID annotate $ANNOTATION