List all sub-commands.
500861
def list_commands(self, ctx):
        """"""
        commands = []
        for filename in os.listdir(self.path):
            if filename == '__init__.py':
                continue
            if filename.endswith('.py'):
                commands.append(filename[:-3].replace("_", "-"))
        commands.sort()
        return commands
851698
def get_commands(self):
		
		shutit_global.shutit_global_object.yield_to_draw()
		s = ''
		for c in self.build['shutit_command_history']:
			if isinstance(c, str):
				#Ignore commands with leading spaces
				if c and c[0] != ' ':
					s += c + '\n'
		return s
70452
def _format_subcommand(command):
    """"""
    yield '.. object:: {}'.format(command.name)

    # click 7.0 stopped setting short_help by default
    if CLICK_VERSION < (7, 0):
        short_help = command.short_help
    else:
        short_help = command.get_short_help_str()

    if short_help:
        yield ''
        for line in statemachine.string2lines(
                short_help, tab_width=4, convert_whitespace=True):
            yield _indent(line)
1310697
def commands(self) -> List[Mapping[str, Mapping[str, Any]]]:
        
        return self._commands
665179
def subparsers(self):
        """"""
        try:
            return self.__subparsers
        except AttributeError:
            parent = super(ArgumentParser, self)
            self.__subparsers = parent.add_subparsers(title="drill down")
            self.__subparsers.metavar = "COMMAND"
            return self.__subparsers
1316753
def list_commands(self, ctx):
        """"""
        rv = defaults.list_commands(ctx)
        if self._commands_dir:
            for filename in os.listdir(self._commands_dir):
                if _is_command_file(filename) and filename[:-3] not in rv:
                    rv.append(filename[:-3])
            rv.sort()
        return rv
554790
def _get_subparsers(self, dest):
        """"""
        if not self._subparsers:
            self._subparsers = self.parser.add_subparsers(dest=dest)
        elif self._subparsers.dest != dest:
            raise KeyError(
                "Subparser names mismatch. You can only create one subcommand.")
        return self._subparsers
804433
def list_commands(self, *path):
        """"""
        path_str = ':'.join(path)

        commands = []
        for command in self.commands:

            # Filter based on prefix and the segment length
            if all([command.startswith(path_str),
                    len(path) == command.count(":")]):

                # offset is used to exclude the path that the caller requested.
                offset = len(path_str) + 1 if path_str else 0
                commands.append(command[offset:])

        return sorted(commands)
152899
def print_all_commands(self, *, no_pager=False):
        
        formatter = self.parent_parser._get_formatter()
        command_names = sorted(self.parent_parser.subparsers.choices.keys())
        max_name_len = max([len(name) for name in command_names]) + 1
        commands = ""
        for name in command_names:
            command = self.parent_parser.subparsers.choices[name]
            extra_padding = max_name_len - len(name)
            command_line = '%s%s%s' % (
                name, ' ' * extra_padding, command.description)
            while len(command_line) > formatter._width:
                lines = textwrap.wrap(command_line, formatter._width)
                commands += "%s\n" % lines[0]
                if len(lines) > 1:
                    lines[1] = (' ' * max_name_len) + lines[1]
                    command_line = ' '.join(lines[1:])
                else:
                    command_line = None
            if command_line:
                commands += "%s\n" % command_line
        if no_pager:
            print(commands[:-1])
        else:
            print_with_pager(commands[:-1])
321211
def commands(self, event):
        
        commands = sorted(self.commands_dict().keys())
        return "Available commands: %s" % " ".join(commands)
990094
def command_children(self, command):
        
        if not len(self.nodes):
            return

        commands = []
        for c in self.nodes:
            commands.append('[con_id="{}"] {};'.format(c.id, command))

        self._conn.command(' '.join(commands))
873848
def _manage_commands():
    
    for name, (command, *aliases) in COMMANDS.items():
        COMMAND_MAPPER[name] = command
        for alias in aliases:
            COMMAND_MAPPER[alias] = command
        COMMAND_ALIASES[name] = aliases
1323310
def list_commands(self, ctx):
        """"""
        commands = super(PinaxGroup, self).list_commands(ctx)
        return [cmd for cmd in order_manually(commands)]
298895
def print_last_commands():
    """"""
    iterable = archive.list_command_history(descending=True)
    for entry in islice(iterable, 0, 10):
        print(entry)
1137491
def commands(self):
        
        if self._commands is None:
            self._commands = CommandList(self)
        return self._commands
713687
def cmd_list(self, argv, help):
        """"""
        parser = argparse.ArgumentParser(
            prog="%s list" % self.progname,
            description=help,
        )
        parser.add_argument("list", nargs=1,
                            metavar="listname",
                            help="Name of list to show.",
                            choices=sorted(self.list_cmds))
        parser.add_argument("listopts",
                            metavar="...",
                            nargs=argparse.REMAINDER,
                            help="list command options")
        args = parser.parse_args(argv)
        for name, func in sorted(self.list_cmds[args.list[0]]):
            func(args.listopts, func.__doc__)
730929
def engineer_list_commands(self):

        

        rv = []
        for k in dir(self):
            attr = getattr(self,k)
            if type(getattr(attr, "engineer", None)) == dict:
                rv.append(k)
        return rv