diff --git a/sh/core/code.sh b/sh/core/code.sh index c87ad35..28f5c06 100644 --- a/sh/core/code.sh +++ b/sh/core/code.sh @@ -296,22 +296,21 @@ ${rwx_code_modules_user} EOF # load code cache rwx_code_load - # set command - local command - # command name used to run - # (stripped from hyphen interactive flag) - command="$(basename "${0}" | sed "s|^-||")" - case "${command}" in - "bash" | "dash" | "sh") unset command ;; - *) ;; - esac # context / shell if rwx_shell_interactive; then # display help rwx_code_help # context / command else + local command local function + # command name used to run + # (stripped from hyphen interactive flag) + command="$(basename "${0}" | sed "s|^-||")" + case "${command}" in + "bash" | "dash" | "sh") unset command ;; + *) ;; + esac # find the matching function function="$(rwx_code_command_function "${command}")" if [ -n "${function}" ]; then