Closed coke closed 5 years ago
Yes. “in the order they were defined” is maybe trickier than it sounds, so just sorting by the name is a good start.
I see several possible ways of doing this. Task are stored in %TASKS
. So we could simply set up that variable to have a task called "help" added. That would effectively go into the library.
Second way is to make it simply a function of the binary. It wouldn't change the library code, then. I'll try the first way.
@coke what do you think?
@JJ this actually breaks it for sakefiles that already have a help
task. For example: https://github.com/perl6/whateverable/blob/43a4e48262863fe6148f0e1e59e01363b2545d4c/Sakefile#L4
So the change needs to be reverted or we should make it somehow respect custom help
tasks.
Would it be nice to have 'sake help' to show the tasks in the order they were defined, along with any POD help assigned to the task?