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