From ba8dee99e7a6ea47973c954a0a00b29b74cee983 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 11 Jul 2025 16:24:24 +0200 Subject: [PATCH] code/functions --- sh/core/code.sh | 180 +++++++++++++++++++++++++----------------------- 1 file changed, 92 insertions(+), 88 deletions(-) diff --git a/sh/core/code.sh b/sh/core/code.sh index 4c12e49..7d7e166 100644 --- a/sh/core/code.sh +++ b/sh/core/code.sh @@ -41,14 +41,30 @@ _rwx_code_tasks_todo="" # cache for code variables _rwx_code_variables="" -# ╭──────┬───────╮ -# │ code │ cache │ -# ╰──────┴───────╯ +# ╭──────┬───────────╮ +# │ code │ functions │ +# ╰──────┴───────────╯ -# output all cached code -rwx_code_cache() { - rwx_code_cache_main - rwx_code_cache_user +# show the cached awk script +rwx_code_awk() { + echo "${_rwx_code_awk}" +} + +# show the cached aliases +#= rca +rwx_code_aliases() { + echo "${_rwx_code_aliases}" +} + +# show the cached aliases and functions +#= rcaf +rwx_code_aliases_functions() { + echo "${_rwx_code_aliases_functions}" +} + +# show the cached binaries +rwx_code_binaries() { + echo "${_rwx_code_binaries}" } # output cached main code @@ -61,6 +77,75 @@ rwx_code_cache_user() { echo "${rwx_code_cache_user}" } +# show the cached commands +rwx_code_commands() { + echo "${_rwx_code_commands}" +} + +# show the cached commands and functions +#= rccf +rwx_code_commands_functions() { + echo "${_rwx_code_commands_functions}" +} + +# show the cached constants +#= rcc +rwx_code_constants() { + echo "${_rwx_code_constants}" +} + +# show the cached functions +#= rcf +rwx_code_functions() { + echo "${_rwx_code_functions}" +} + +# show the cached main modules +#= rcmm +rwx_code_modules_main() { + echo "${rwx_code_modules_main}" +} + +# show the cached user modules +#= rcmu +rwx_code_modules_user() { + echo "${rwx_code_modules_user}" +} + +# show the cached tasks +#= rct +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 +#= rcv +rwx_code_variables() { + echo "${_rwx_code_variables}" +} + +# ╭──────┬───────╮ +# │ code │ cache │ +# ╰──────┴───────╯ + +# output all cached code +rwx_code_cache() { + rwx_code_cache_main + rwx_code_cache_user +} + # ╭──────┬─────────╮ # │ code │ install │ # ╰──────┴─────────╯ @@ -104,11 +189,6 @@ export ENV=\"${rwx_main_path}\" # │ code │ parts │ # ╰──────┴───────╯ -# show the cached awk script -rwx_code_awk() { - echo "${_rwx_code_awk}" -} - # call awk for action with target rwx_code_action_target() { local action="${1}" @@ -121,12 +201,6 @@ rwx_code_action_target() { "${_rwx_code_awk}" } -# show the cached aliases -#= rca -rwx_code_aliases() { - echo "${_rwx_code_aliases}" -} - # find command function rwx_code_command_function() { local name="${1}" @@ -138,40 +212,6 @@ rwx_code_command_function() { "${_rwx_code_awk}" } -# show the cached aliases and functions -#= rcaf -rwx_code_aliases_functions() { - echo "${_rwx_code_aliases_functions}" -} - -# show the cached binaries -rwx_code_binaries() { - echo "${_rwx_code_binaries}" -} - -# show the cached commands -rwx_code_commands() { - echo "${_rwx_code_commands}" -} - -# show the cached commands and functions -#= rccf -rwx_code_commands_functions() { - echo "${_rwx_code_commands_functions}" -} - -# show the cached constants -#= rcc -rwx_code_constants() { - echo "${_rwx_code_constants}" -} - -# show the cached functions -#= rcf -rwx_code_functions() { - echo "${_rwx_code_functions}" -} - # show all the cached main modules #= rcm rwx_code_modules() { @@ -179,42 +219,6 @@ rwx_code_modules() { rwx_code_modules_user } -# show the cached main modules -#= rcmm -rwx_code_modules_main() { - echo "${rwx_code_modules_main}" -} - -# show the cached user modules -#= rcmu -rwx_code_modules_user() { - echo "${rwx_code_modules_user}" -} - -# show the cached tasks -#= rct -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 -#= rcv -rwx_code_variables() { - echo "${_rwx_code_variables}" -} - # ╭──────┬───────╮ # │ code │ parse │ # ╰──────┴───────╯