From 43c1cfe9205c1a413ca28be42a3eb4e2c9bf85a3 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 06 Dec 2015 22:31:03 -0500 Subject: lib/cmd.sh: Use registered commands --- (limited to 'lib') diff --git a/lib/cmd.sh b/lib/cmd.sh index 866896e..ecedb37 100644 --- a/lib/cmd.sh +++ b/lib/cmd.sh @@ -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() -- cgit v0.9.1