diff options
author | P. J. McDermott <pjm@nac.net> | 2013-10-23 21:21:42 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-10-23 21:21:42 (EDT) |
commit | 09a410df8490dce69996ef4555e4658dd4721cb4 (patch) | |
tree | 2052f76cc666cfa2f40c159eff002080c4fa3f18 | |
parent | 594c77a22e22da38a216a4b141ba8078b3431b53 (diff) |
running_cmd: New variable.
-rw-r--r-- | lib/cmd.sh | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -25,6 +25,8 @@ use locale CMDS='@cmds@' +running_cmd= + load_cmds() { local cmd= @@ -114,7 +116,9 @@ run_cmd() cmd_clean="$(printf '%s' "${cmd}" | \ tr '[A-Z]' '[a-z]' | tr -C '[a-z0-9_]' '_')" if is_cmd "${cmd}"; then + running_cmd="${cmd}" "cmd_${cmd_clean}_main" "${@}" + running_cmd='' else error 1 "$(get_msg 'cmd_not_found')" "${cmd}" fi |