summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2014-02-24 14:44:06 +0100
committerMichal Minar <miminar@redhat.com>2014-02-24 15:26:56 +0100
commit6cca6c443f29fb34797d074f1da1ae9dcca397a7 (patch)
tree1c1c889ec328a40257553c659facf7b64beb80d7 /tools
parentdf210986367b520e54c0ad4f42096a4526d19558 (diff)
downloadopenlmi-scripts-6cca6c443f29fb34797d074f1da1ae9dcca397a7.tar.gz
openlmi-scripts-6cca6c443f29fb34797d074f1da1ae9dcca397a7.tar.xz
openlmi-scripts-6cca6c443f29fb34797d074f1da1ae9dcca397a7.zip
tools: allow Commands section to be omitted
Diffstat (limited to 'tools')
-rwxr-xr-xtools/help2rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/help2rst b/tools/help2rst
index bb2df8c..7dce05c 100755
--- a/tools/help2rst
+++ b/tools/help2rst
@@ -96,12 +96,12 @@ def process_usage_line(line):
Parsing usage strings after 'Usage:' and before 'Commands:'.
Just add formatting to usage strings.
"""
- if line.startswith("Commands:"):
+ if line.startswith("Commands:") or line.startswith('Options:'):
print
- print "**Commands:**"
+ print "**Commands:**" if line.startswith("Commands") else "**Options:**"
print
return process_commands_line
-
+
# -o and --options should be bold, but they must *not* be preceeded
# by [a-z] character.
# I.e. 'partition-table' should be skipped, while '--option' should