trepan/processor/command/help.py
def show_category(self, category, args):
        """Show short help for all commands in `category'."""
        n2cmd = self.proc.commands
        names = list(n2cmd.keys())
        if len(args) == 1 and args[0] == '*':
            self.section("Commands in class %s:" % category)
            cmds = [cmd for cmd in names if category == n2cmd[cmd].category]
            cmds.sort()
            self.msg_nocr(self.columnize_commands(cmds))
            return

        self.msg("%s.\n" % categories[category])
        self.section("List of commands:")
        names.sort()
        for name in names:  # Foo! iteritems() doesn't do sorting
            if category != n2cmd[name].category: continue
            self.msg("%-13s -- %s" % (name, n2cmd[name].short_help,))
            pass
        return
def show_category(self, category, args):
        n2cmd = self.proc.commands
        names = list(n2cmd.keys())
        if len(args) == 1 and args[0] == '*':
            self.section("Commands in class %s:" % category)
            cmds = [cmd for cmd in names if category == n2cmd[cmd].category]
            cmds.sort()
            self.msg_nocr(self.columnize_commands(cmds))
            return

        self.msg("%s.\n" % categories[category])
        self.section("List of commands:")
        names.sort()
        for name in names:  # Foo! iteritems() doesn't do sorting
            if category != n2cmd[name].category: continue
            self.msg("%-13s -- %s" % (name, n2cmd[name].short_help,))
            pass
        return
def show_category ( self , category , args ) : n2cmd = self . proc . commands names = list ( n2cmd . keys ( ) ) if len ( args ) == 1 and args [ 0 ] == '*' : self . section ( "Commands in class %s:" % category ) cmds = [ cmd for cmd in names if category == n2cmd [ cmd ] . category ] cmds . sort ( ) self . msg_nocr ( self . columnize_commands ( cmds ) ) return self . msg ( "%s.\n" % categories [ category ] ) self . section ( "List of commands:" ) names . sort ( ) for name in names : # Foo! iteritems() doesn't do sorting if category != n2cmd [ name ] . category : continue self . msg ( "%-13s -- %s" % ( name , n2cmd [ name ] . short_help , ) ) pass return
Show short help for all commands in `category'.
Show short help for all commands in category .