jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
368 stars 32 forks source link

RFE: taskopen -D #20

Closed linuxcaffe closed 11 years ago

linuxcaffe commented 11 years ago

-D as in Delete

Currently, "taskopen -x rm" will delete the target of an annotation, but it will leave the annotation itself. The -D flag instructs taskopen to delete an annotation (but not the target).

To delete both target AND annotation

taskopen -x rm -D

jschlatow commented 11 years ago

Maybe this should nag the user if multiple annotations are going to be deleted.

linuxcaffe commented 11 years ago

absolutely!

linuxcaffe commented 11 years ago

errors! djp@tigger:~/bin$ to -D 49

Please select an annotation: 1) /home/djp/taskopen-screenshot.html ("test taskopen") -- 49 2) Notes ("test taskopen") -- 49 Type number: 1 Can't use string ("arg") as a HASH ref while "strict refs" in use at /home/djp/bin/taskopen.pl line 199, line 1.

linuxcaffe commented 11 years ago

Notice the space below (known taskwarrior bug?) '/home/ djp/tas.. I've see several occurrences of this extra space, basically making "~/" useless. see: taskwarrior Bug #819 ?


djp@tigger:~/bin$ to -D 49

Please select an annotation: 1) /home/djp/taskopen-screenshot.html ("test taskopen") -- 49 2) Notes ("test taskopen") -- 49 Type number: 1 Did not find any matching annotation to be deleted for '/home/ djp/taskopen-screenshot.html'. Denotated 0 tasks.

linuxcaffe commented 11 years ago

maybe, as a workaround to the space-bug thing, the "taskopen -D 10" option calls "task 10 denotate ~/", (or some other small set of matching characters from the users choice) instead of the full "task 10 mod /annotation//" thing, which won't work till the taskwarrior parser is less generous with the extra "space" s..

couldn't using "denotate" just sidestep that, at least as far as "-D" is concerned?