taskwarrior
taskwarrior copied to clipboard
Delegation of sub-commands
It would be great if I could add subcommands to task, e.g. if I call task foobar and there is an executable task-foobar in $PATH, then execute that instead. This is how Git and many other tools work, and it's a great way to extend functionality.
I thought this could maybe be done using the following configuration
alias.foobar=execute task-foobar
and there would be merit to requiring such explicit configuration, but it doesn't actually work, possibly due to #2105.
What functionality does this provide in this case:
$ task foobar ...
over this case:
$ task-foobar ...
It's easier not to have to remember what subcommands need a dash, and which don't? Git and several other tools have really paved the way here…
It should work, and I agree, that #2105 is a likely cause. Keeping this open to make sure.
Another nice thing is that all filters could be handled by taskwarrior before invoking the subcommand, then the task ids could be passed to the subcommand somehow (e.g. stdin, like done for hooks?).
Example:
task +mytag foobar