diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-12-06 22:31:03 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-12-06 22:31:03 (EST) |
commit | 43c1cfe9205c1a413ca28be42a3eb4e2c9bf85a3 (patch) | |
tree | 255ad28f5d32efc8cbedcbff377a116cc7b10a6f | |
parent | b0df85656bafbf63664cf21f694fc526f9cf1e2b (diff) |
lib/cmd.sh: Use registered commands
-rw-r--r-- | lib/cmd.sh | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -24,7 +24,6 @@ _CMD_SM=1 use output use locale -CMDS='@cmds@' cmds=' ' running_cmd= @@ -41,11 +40,7 @@ register_cmd() load_cmds() { - local cmd= - - for cmd in ${CMDS}; do - use "cmd/${cmd}" - done + : Stub to be removed. } print_opt_summaries() @@ -85,7 +80,7 @@ print_cmd_summaries() local summary= padding="$(printf '%24s' '')" - for cmd in ${CMDS}; do + for cmd in ${cmds}; do if [ ${#cmd} -gt 20 ]; then printf ' %s\n%24s' "${cmd}" '' else @@ -116,7 +111,7 @@ is_cmd() { local cmd="${1}" - [ "x$(printf '%s\n' ${CMDS} | grep "^${cmd}$")" = "x${cmd}" ] + [ "x$(printf '%s\n' ${cmds} | grep "^${cmd}$")" = "x${cmd}" ] } run_cmd() |