]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - tools/make-directive-index.py
man: sort options without "=" in the directives index
[thirdparty/systemd.git] / tools / make-directive-index.py
index 5b965f416326707b52e84c297e8bc33b001c2d29..da10575f32bcffad9041dc9c9482d94798ebeeb8 100755 (executable)
@@ -187,6 +187,9 @@ def _extract_directives(directive_groups, formatting, page):
                              storvar if klass else storopt)):
             for name in variablelist.iterfind(xpath):
                 text = re.sub(r'([= ]).*', r'\1', name.text).rstrip()
+                if text.startswith('-'):
+                    # for options, merge options with and without mandatory arg
+                    text = text.partition('=')[0]
                 stor[text].append((pagename, section))
                 if text not in formatting:
                     # use element as formatted display