summaryrefslogtreecommitdiffstats
path: root/lib/cmd
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-07-12 11:05:17 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-07-12 11:05:17 (EDT)
commit7097b57fc99a358bf81c41d61c0a4aacf6b58e61 (patch)
tree18719847d4bba199bc1723adea2a778ee8a6a01f /lib/cmd
parentc3d3f0c1ac1ef45916b3ff7d32b39f9531f94e51 (diff)
print_cmd_usage(): Implement and use.
Diffstat (limited to 'lib/cmd')
-rw-r--r--lib/cmd/help.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/cmd/help.sh b/lib/cmd/help.sh
index 129cb14..39de93f 100644
--- a/lib/cmd/help.sh
+++ b/lib/cmd/help.sh
@@ -22,8 +22,12 @@ cmd_usage '[<command>]'
cmd_help_main()
{
+ local cmd
+
if [ ${#} -eq 1 ]; then
- if is_cmd "${1}"; then
+ cmd="${1}"
+ if is_cmd "${cmd}"; then
+ print_cmd_usage "${cmd}"
return 0
fi
fi