File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/components/Generator/GeneredTaskfile Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,15 @@ function title {
52
52
echo -e " \n${BLUE} =>${RESET} $1 \n"
53
53
}
54
54
55
+ # shellcheck disable=SC2120
55
56
function task:help { # # Show all available tasks
57
+ TASKFILE_FILE=${1-$0 }
56
58
title " Available tasks"
57
59
awk ' BEGIN {FS = " { [#][#][ ]?"} /^([a-zA-Z_-]*:?.*)(\{ )?[#][#][ ]?/ \
58
- {printf "\033[33m%-34s\033[0m %s\n", $1, $2}' $0 | \
60
+ {printf "\033[33m%-34s\033[0m %s\n", $1, $2}' " $TASKFILE_FILE " | \
59
61
sed -E " s/[#]{2,}[ ]*/${RESET} /g" | \
60
62
sed -E " s/function task:*/ /g"
61
- echo -e " \n${BLUE} Usage:${RESET} ./Taskfile ${YELLOW} <task>${RESET} <args>"
63
+ echo -e " \n${BLUE} Usage:${RESET} $TASKFILE_FILE ${YELLOW} <task>${RESET} <args>"
62
64
}
63
65
64
66
function task:shorthand { # # Create CLI shorthand task instead of ./Taskfile
You can’t perform that action at this time.
0 commit comments