summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-06-18 15:04:00 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-06-18 15:11:11 +0200
commit1b63fdccab1cf8ac873dac012908936056eeaf19 (patch)
tree9e8d9ad7456fbd6d55ee9f1a990a9183b7c82036 /tool
parent2eece6543e80ba1033b91ce5f777d7d22606c64a (diff)
tool: Make make-usage.sh more robust
- If a subcommand's help is very long, then clap breaks the help across multiple lines. To prevent the first word in the continued line from being interpreted as a subcommand, only consider lines with exactly four leading spaces.
Diffstat (limited to 'tool')
-rw-r--r--tool/make-usage.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/make-usage.sh b/tool/make-usage.sh
index bec96386..73d1d3e1 100644
--- a/tool/make-usage.sh
+++ b/tool/make-usage.sh
@@ -34,6 +34,7 @@ dump_help() { # subcommand, indention
printf "$help\n" |
sed -n '/^SUBCOMMANDS:/,$p' |
tail -n+2 |
+ grep '^ [^ ]' |
while read subcommand desc
do
if [ "$subcommand" = help ]; then