From ecc2f5325464ef8b628cd6f6e41798b196ea1ee6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 12 Jul 2025 02:29:04 +0200 Subject: [PATCH] command/function --- sh/core/code.sh | 11 ----------- sh/core/shell.sh | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/sh/core/code.sh b/sh/core/code.sh index 60206e7..ad5d196 100644 --- a/sh/core/code.sh +++ b/sh/core/code.sh @@ -201,17 +201,6 @@ rwx_code_action_target() { "${_rwx_code_awk}" } -# find command function -rwx_code_command_function() { - local name="${1}" - [ -n "${name}" ] || return - rwx_code_cache | - awk \ - -v action="command function" \ - -v target="${name}" \ - "${_rwx_code_awk}" -} - # show all the cached main modules #= rcm rwx_code_modules() { diff --git a/sh/core/shell.sh b/sh/core/shell.sh index b0e5027..dd3b744 100644 --- a/sh/core/shell.sh +++ b/sh/core/shell.sh @@ -204,7 +204,7 @@ rwx_shell_main() { *) ;; esac # find the matching function - function="$(rwx_code_command_function "${command}")" + function="$(rwx_code_action_target "command function" "${command}")" if [ -n "${function}" ]; then "${function}" "${@}" fi