summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-07-31 21:34:03 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-07-31 21:34:03 (EDT)
commita95c249fbc6b556270d91b685b980f0cec986b23 (patch)
treebf49d920975a1ef26bcfbd15eb4dbcbeee6d0a67 /lib
parente93df698ad3c5172cf1157a8c72978b427fc0aa8 (diff)
Add oh_usage and support oh-* utils in oh_help.
Diffstat (limited to 'lib')
-rw-r--r--lib/messages.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/messages.sh b/lib/messages.sh
index 3894778..c2c381e 100644
--- a/lib/messages.sh
+++ b/lib/messages.sh
@@ -64,9 +64,19 @@ oh_info()
return 0
}
+oh_usage()
+{
+ _util="$(echo "${0##*/}" | sed 's/-/_/g')"
+ _usage_str="$(eval echo "\$\{oh_str_usage_${_util}\}")"
+ : "${_usage_str:=${oh_str_usage_none}}"
+ printf '%s\n' "${_usage_str}"
+}
+
oh_help()
{
- _help_str="$(eval echo "\$\{oh_str_help_${0##*/}\}")"
+ oh_usage
+ _util="$(echo "${0##*/}" | sed 's/-/_/g')"
+ _help_str="$(eval echo "\$\{oh_str_help_${_util}\}")"
: "${_help_str:=${oh_str_help_none}}"
printf '%s\n' "${_help_str}"
}