From ee8c746db135320fe41c1dc830bda1617216b916 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 14 Jul 2019 12:14:39 +0200 Subject: main: nicely format/wrap help arguments in -h output Signed-off-by: Fabian Groffen --- man/mkman.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'man') diff --git a/man/mkman.py b/man/mkman.py index a1b68a7..13cd1c9 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -69,7 +69,7 @@ def MkMan(applets, applet, output): except: return lines = ahelp.splitlines() - m = re.search(r'^Usage: %s (.*) : (.*)' % applet, ahelp) + m = re.search(r'^usage: %s (.*) : (.*)' % applet, ahelp) usage = m.group(1) short_desc = m.group(2) @@ -92,7 +92,7 @@ def MkMan(applets, applet, output): # Extract all the options options = [] for line, i in zip(lines, range(len(lines))): - if not line.startswith('Options: '): + if not line.startswith('options: '): continue for option in [x.strip().split() for x in lines[i + 1:]]: @@ -128,8 +128,8 @@ def MkMan(applets, applet, output): # Handle applets that have applets extra_sections = [] - if 'Currently defined applets:' in ahelp: - alines = lines[lines.index('Currently defined applets:') + 1:] + if 'currently defined applets:' in ahelp: + alines = lines[lines.index('currently defined applets:') + 1:] alines = alines[:alines.index('')] extra_sections += ( ['.SH APPLETS', '.nf', -- cgit v1.2.3-65-gdbad