tasks/fixme,todo

This commit is contained in:
Marc Beninca 2025-07-11 15:49:23 +02:00
parent b9c14b7dd8
commit 8d8042fefe
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 23 additions and 1 deletions

View file

@ -82,7 +82,13 @@ BEGIN {
match_task = 0 match_task = 0
output_module = ". " m[1] output_module = ". " m[1]
} else if (match($0, RE_TASK, m)) { } else if (match($0, RE_TASK, m)) {
match_task = 1 if (target) {
if (target == m[1]) {
match_task = 1
}
} else {
match_task = 1
}
append($0) append($0)
} else if (match($0, RE_COMMENT, m)) { } else if (match($0, RE_COMMENT, m)) {
append($0) append($0)

View file

@ -36,6 +36,8 @@ _rwx_code_constants=""
_rwx_code_functions="" _rwx_code_functions=""
# cache for code tasks # cache for code tasks
_rwx_code_tasks="" _rwx_code_tasks=""
_rwx_code_tasks_fixme=""
_rwx_code_tasks_todo=""
# cache for code variables # cache for code variables
_rwx_code_variables="" _rwx_code_variables=""
@ -195,6 +197,18 @@ rwx_code_tasks() {
echo "${_rwx_code_tasks}" echo "${_rwx_code_tasks}"
} }
# show the cached fixme tasks
#= rctf
rwx_code_tasks_fixme() {
echo "${_rwx_code_tasks_fixme}"
}
# show the cached todo tasks
#= rctt
rwx_code_tasks_todo() {
echo "${_rwx_code_tasks_todo}"
}
# show the cached variables # show the cached variables
#= rcv #= rcv
rwx_code_variables() { rwx_code_variables() {
@ -255,6 +269,8 @@ EOF
_rwx_code_functions="$(rwx_code_action_target "filter" "function")" _rwx_code_functions="$(rwx_code_action_target "filter" "function")"
# parse tasks # parse tasks
_rwx_code_tasks="$(rwx_code_action_target "tasks")" _rwx_code_tasks="$(rwx_code_action_target "tasks")"
_rwx_code_tasks_fixme="$(rwx_code_action_target "tasks" "FIXME")"
_rwx_code_tasks_todo="$(rwx_code_action_target "tasks" "TODO")"
# parse variables # parse variables
_rwx_code_variables="$(rwx_code_action_target "filter" "variable")" _rwx_code_variables="$(rwx_code_action_target "filter" "variable")"
} }