Lines Matching refs:commands
129 # main() exists so that Commands can be turned into stand-alone scripts.
133 # Some commands might require a dummy tool
173 make_option("-a", "--all-commands", action="store_true", dest="show_all_commands", help="Print all available commands"),
176 self.show_all_commands = False # A hack used to pass --all-commands to _help_epilog even though it's called by the OptionParser.
179 # Only show commands which are relevant to this checkout's SCM system. Might this be confusing to some users?
181 epilog = "All %prog commands:\n"
182 relevant_commands = self._tool.commands[:]
184 epilog = "Common %prog commands:\n"
185 relevant_commands = filter(self._tool.should_show_in_main_help, self._tool.commands)
190 epilog += "See '%prog help --all-commands' to list all commands.\n"
194 # FIXME: This is a hack so that we don't show --all-commands as a global option:
215 def __init__(self, name=None, commands=None):
218 self.commands = commands or [cls() for cls in self._find_all_commands() if cls.name]
223 self.commands.append(self.help_command)
224 for command in self.commands:
236 commands = set()
237 cls._add_all_subclasses(Command, commands)
238 return sorted(commands)
262 for command in self.commands: