diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-03-27 12:42:58 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-03-27 12:42:58 -0400 |
commit | f27b1c430a13ed45dba638f2390e6a22f7199f8f (patch) | |
tree | 31152bda4a7f157e7023190bcc15aed3d6148c3a /man/mkman.py | |
parent | man: regen manpages (diff) | |
download | portage-utils-f27b1c430a13ed45dba638f2390e6a22f7199f8f.tar.gz portage-utils-f27b1c430a13ed45dba638f2390e6a22f7199f8f.tar.bz2 portage-utils-f27b1c430a13ed45dba638f2390e6a22f7199f8f.zip |
usage: handle optional args, and auto-align display
Since --help is not performance sensitive, add a bit of logic to auto
align the width of the help columns.
Diffstat (limited to 'man/mkman.py')
-rwxr-xr-x | man/mkman.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man/mkman.py b/man/mkman.py index 1ec8584..0751b92 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -89,8 +89,8 @@ def MkMan(applets, applet, output): flags += [option[0].rstrip(',')] option.pop(0) - if option[0] == '<arg>': - flags = [r'\fB%s\fR \fI<arg>\fR' % x for x in flags] + if option[0] in ('<arg>', '[arg]'): + flags = [r'\fB%s\fR \fI%s\fR' % (x, option[0]) for x in flags] option.pop(0) else: flags = [r'\fB%s\fR' % x for x in flags] |