code/awk
All checks were successful
/ job (push) Successful in 4m27s

This commit is contained in:
Marc Beninca 2025-07-07 01:13:06 +02:00
parent be43cb7fe1
commit 2f7dd63c74
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
4 changed files with 14 additions and 9 deletions

View file

@ -117,7 +117,6 @@ Two interpreted languages for flexibility.
* get unresolved path for new panes & windows
* fully working doc function algorithm
* self install aliases
* cache awk code
* list aliases
### 6.2 [Further tasks](#when) {#when-further}

View file

@ -1,10 +1,18 @@
# code
# module
# ╭──────╮
# │ code │
# ╰──────╯
# ╭──────┬───────────╮
# │ code │ variables │
# ╰──────┴───────────╯
# path to the required parsing awk script
_rwx_code_awk="$(cat "${RWX_ROOT_SYSTEM}/code.awk")"
# ╭──────┬───────╮
# │ code │ parts │
# ╰──────┴───────╯
# show the cached code
#= rc
rwx_code() {
@ -36,7 +44,7 @@ rwx_code_variables() {
}
# ╭──────┬───────╮
# │ code │ check
# │ code │ parse
# ╰──────┴───────╯
# check source code
@ -58,5 +66,5 @@ rwx_code_doc() {
awk \
--assign action="doc" \
--assign target="${name}" \
--file "${RWX_AWK}"
"${_rwx_code_awk}"
}

View file

@ -45,8 +45,6 @@ RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}"
# user root directory of the project
RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}"
# path to the required parsing awk script
RWX_AWK="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME%.sh}.awk"
# path to the entrypoint main file of the project
RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}"
@ -225,7 +223,7 @@ rwx_parse_aliases_functions() {
printf "%s" "${_rwx_code}" |
awk \
--assign action="alias" \
--file "${RWX_AWK}"
"${_rwx_code_awk}"
}
rwx_parse_constants() {
printf "%s" "${_rwx_code}" |