-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelp.sh
More file actions
37 lines (30 loc) · 756 Bytes
/
help.sh
File metadata and controls
37 lines (30 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# shellcheck disable=all
#
# Help and usage messages.
#
# Sources:
#
# https://linuxcommand.org/lc3_adv_standards.php
# USAGE should match the "Usage" section from the comment block.
# HELP's description should match the description or "Long Description" from the
# comment block.
# Usage: Separate lines for mutually exclusive options.
usage() {
printf "%s\n" \
"${bold}Usage:${reset} ${PROGNAME} [-q|--quiet] <DIR>"
printf "%s\n" \
" ${PROGNAME} [-h|--help]"
}
# Help message for --help
help_message() {
cat <<-_EOF_
${bold}${PROGNAME} ${VERSION}${reset}
${cyan}
[Long description]${reset}
$(usage)
${bold}Options:${reset}
-h, --help Display this help message and exit.
-q, --quiet Quiet mode.
_EOF_
}