Commit 1f4e391b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Show "--help" in bash completion

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent edb4b374
......@@ -584,6 +584,14 @@ def GetCommands(filename, module):
raise Exception("Script %s doesn't have 'commands' attribute" %
# Add the implicit "--help" option
help_option = cli.cli_option("-h", "--help", default=False,
for (_, _, optdef, _, _) in commands.itervalues():
if help_option not in optdef:
# Use aliases
aliases = getattr(module, "aliases", {})
if aliases:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment