-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
I know the idea is to be lightweight as possible, but here is a slightly more helpful help, if it's helpful for anybody.
It omits the help and default tasks from the list of commands, and then displays the contents of the default task:
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | grep -v 'help\|default' | cat -n
echo
type default | sed -e '1d; 2s/()/task:/; s/^/ /'
echo
}The output looks like this, for an example Taskfile with a slightly complicated default for illustration:
./Taskfile <task> <args>
Tasks:
1 install
2 build
3 run
4 update
5 upgrade
default task:
{
update;
for file in src/*;
do
upgrade $file;
done
}
Task completed in 0m0.003s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels