summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. 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)
commit43c1cfe9205c1a413ca28be42a3eb4e2c9bf85a3 (patch)
tree255ad28f5d32efc8cbedcbff377a116cc7b10a6f
parentb0df85656bafbf63664cf21f694fc526f9cf1e2b (diff)
lib/cmd.sh: Use registered commands
-rw-r--r--lib/cmd.sh11
1 files changed, 3 insertions, 8 deletions
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()