summaryrefslogtreecommitdiffhomepage
path: root/subr.ex
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-22 04:47:23 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-22 04:47:23 +0100
commita2d9a26f4cd7b4076c6be4a370f3c382a785e0c6 (patch)
tree7f6a1d0f932a8c221c9465a3f84597ddb44b08e1 /subr.ex
parent7b6d2fd9a9ffd0caf45602a96cf09ac73ab85cf4 (diff)
downloadmidipix_build-a2d9a26f4cd7b4076c6be4a370f3c382a785e0c6.tar.bz2
midipix_build-a2d9a26f4cd7b4076c6be4a370f3c382a785e0c6.tar.xz
subr.ex/ex_init.subr:ex_init_help(): show short usage information given -h.
Diffstat (limited to 'subr.ex')
-rw-r--r--subr.ex/ex_init.subr15
1 files changed, 12 insertions, 3 deletions
diff --git a/subr.ex/ex_init.subr b/subr.ex/ex_init.subr
index 13e0edd3..e15efda8 100644
--- a/subr.ex/ex_init.subr
+++ b/subr.ex/ex_init.subr
@@ -178,7 +178,16 @@ ex_init_help() {
while [ "${#}" -gt 0 ]; do
case "${1}" in
- -h|--help)
+ -h)
+ if [ -t 1 ]; then
+ cat "etc/${_eih_name_base}.usage.short";
+ else
+ sed 's/\[[0-9]\+m//g' "etc/${_eih_name_base}.usage.short";
+ fi;
+ exit 0;
+ ;;
+
+ --help)
if [ -t 1 ]; then
cat "etc/${_eih_name_base}.usage";
else
@@ -206,9 +215,9 @@ ex_init_help() {
case "${_eih_opt}" in
h)
if [ -t 1 ]; then
- cat "etc/${_eih_name_base}.usage";
+ cat "etc/${_eih_name_base}.usage.short";
else
- sed 's/\[[0-9]\+m//g' "etc/${_eih_name_base}.usage";
+ sed 's/\[[0-9]\+m//g' "etc/${_eih_name_base}.usage.short";
fi;
exit 0;
;;