jschlatow / taskopen

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

Allow empty (but labelled) annotations #54

Closed jschlatow closed 11 years ago

jschlatow commented 11 years ago

In combination with #51, the following will be possible:

task 42 mod +\#52
task 42 annotate github:

If the part after the label is empty, taskopen should add the task's ID instead as an argument to the executed command, so that:

taskopen -x github.sh 42 \\github

executes github.sh 42, which then queries taskwarrior in order to get the project name, ticket number and assemble the corresponding URI.

linuxcaffe commented 11 years ago

The first example presents a number of intriguing possibilities; 1) action based on labeled-but-empty annotations, 2) cross-referential behavior, between one task ID and another, and c) actions based on +tags. Wow!

and yet, why would this function not use

task 42 annotate github: \#52

?

What might the result of "github.sh 42" look like? What part of task52 might be used?

jschlatow commented 11 years ago

In this particular case, github.sh executes the following:

$BROWSER https://github.com/ValiValpas/taskopen/issues/52

Where "52" and "taskopen" are variable and taken from the task with ID 42, i.e. its project and its tag "#52".

jschlatow commented 11 years ago

Solved by #67:

CUSTOM1_REGEX="github"
CUSTOM1_CMD="github.sh $UUID"