Skip to content

Commit 0fd070c

Browse files
committed
Clean up awk regex
1 parent fe6fcb6 commit 0fd070c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bin/task

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ if [[ -z "$TASKFILE" ]]; then
3030
fi
3131

3232
if [[ $1 == 'comp_targets' ]]; then
33-
awk 'BEGIN {FS = " { [#][#][ ]?"} /^function task([a-zA-Z_-]*:?.*)(\{ )?[#][#][ ]?/ {printf "%s:%s\n", $1, $2}' \
34-
"$TASKFILE" \
33+
awk 'BEGIN {FS = " { [#][#][ ]?"} /^function task:(.*)[#][#][ ]?/ {printf "%s:%s\n", $1, $2}' "$TASKFILE" \
3534
| sed -E 's/[#]{2,}[ ]*//g' \
3635
| sed -E 's/function task://g'
3736
exit 1

0 commit comments

Comments
 (0)