diff options
-rw-r--r-- | lib/cmd.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -84,10 +84,13 @@ is_cmd() run_cmd() { local cmd="${1}" + local cmd_clean= shift + cmd_clean="$(printf '%s' "${cmd}" | \ + tr '[A-Z]' '[a-z]' | tr -C '[a-z0-9_]' '_')" if is_cmd "${cmd}"; then - "cmd_${cmd}_main" "${@}" + "cmd_${cmd_clean}_main" "${@}" else error 1 "$(get_msg 'cmd_not_found')" "${cmd}" fi |