Revision 1f4e391b

b/autotools/build-bash-completion
584 584
    raise Exception("Script %s doesn't have 'commands' attribute" %
585 585
                    filename)
586 586

  
587
  # Add the implicit "--help" option
588
  help_option = cli.cli_option("-h", "--help", default=False,
589
                               action="store_true")
590

  
591
  for (_, _, optdef, _, _) in commands.itervalues():
592
    if help_option not in optdef:
593
      optdef.append(help_option)
594

  
587 595
  # Use aliases
588 596
  aliases = getattr(module, "aliases", {})
589 597
  if aliases:

Also available in: Unified diff