summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-09-19 07:01:34 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2020-11-20 22:53:31 -0500
commit343946c08902aecad2b52cdda5761e6246825e99 (patch)
tree4e664df178aeaf12e9c3fe19420b3c6a21c7b7a4 /src/lib
parent6f6a58874ed66111ad0563e77fc01aef413f98ca (diff)
sq - docs
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/messages.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/messages.sh b/src/lib/messages.sh
index a43533a..b96c637 100644
--- a/src/lib/messages.sh
+++ b/src/lib/messages.sh
@@ -106,15 +106,20 @@ bullet() {
printf -- "$mesg" "$@" | fmt -u -w 71 | sed -e '1s/^/ - /' -e '2,$s/^/ /'
}
-# Usage: flag [FLAG DESCRIPTION|HEADING:]...
+# Usage: flag |HEADING:] [FLAG DESCRIPTION [FLAG DESCRIPTION]...]
#
-# Print a flag and description formatted for --help text.
+# Print formatted for --help text, a heading, to preceed a (possibly empty)
+# list of flags and their description, or a list of flags and descriptions,
+# with an optional heading.
#
-# ex: flag '-C <FILE>' 'Use this file instead of pacman.conf'
+# ex: flag 'Options:' '-C <FILE>' 'Use this file instead of pacman.conf'
+# ex: flag 'Options:'
+# flag '-C <FILE>' 'Use this file instead of pacman.conf' \
+# '-n <NAME>' 'Name of the chroot to use'
#
-# The descriptions and headings are fed through gettext, the flags ar
-# not, so if part of a flag needs to be translated, you must handle
-# that explicitly, using $(_ <MSGID_STRING>):
+# The headings and descriptions are fed through gettext; but the flags are not.
+# If part of a flag needs to be translated, you must handle that explicitly,
+# using the translation helper directly, of the form $(_ <MSGID_STRING>).
#
# ex: flag "-C <$(_ FILE)>" 'Use this file instead of pacman.conf'
#