Returns the default help message describing the bot's command repertoire.
 Commands are sorted alphabetically by name, and are displayed according
 to the bot's and the commands's _public_ attribute.
182301
def help_message(sender, command_name) #:nodoc:
      if command_name.nil? || command_name.length == 0
        # Display help for all commands
        help_message = "I understand the following commands:\n\n"

        @commands[:meta].sort.each do |command|
          # Thank you, Hash.sort
          command = command[1]

          if !command[:is_alias] && (command[:is_public] || master?(sender))
            command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
            help_message += "  #{command[:description]}\n\n"
          end
        end
      else
        # Display help for the given command
        command = @commands[:meta][command_name]

        if command.nil?
          help_message = "I don't understand '#{command_name}' Try saying" +
              " 'help' to see what commands I understand."
        else
          help_message = ''
          command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
          help_message += "  #{command[:description]} "
        end
      end

      help_message
    end
942310
def help(opts, bot, _):
    
    command = opts['<command>']
    if command is None:
        return bot.help_text()

    if command not in bot.commands:
        return "%r is not a known command" % command

    return bot.commands[command].__doc__
287490
public static String getHelpText(Collection<IBotCommand> botCommands) {
		return getHelpText(botCommands.toArray(new IBotCommand[botCommands.size()]));
	}
1111992
def get_commands(self, namespace):
        
        if not namespace:
            # Default name space:
            namespace = DEFAULT_NAMESPACE

        try:
            namespace.strip().lower()
            commands = list(self._commands[namespace].keys())
            commands.sort()
            return commands
        except KeyError:
            # Unknown name space
            return []
286243
def _default_commands(self):
        
        commands = [c() for c in find_commands(Command)]

        #: Get commands installed via entry points
        for ep in pkg_resources.iter_entry_points(
                group="enaml_native_command"):
            c = ep.load()
            if not issubclass(c, Command):
                print("Warning: entry point {} did not return a valid enaml "
                      "cli command! This command will be ignored!".format(
                    ep.name))
            commands.append(c())

        return commands
58445
def show_help(command_name: str = None, raw_args: str = '') -> Response:
    

    response = Response()

    cmds = fetch()
    if command_name and command_name in cmds:
        parser, result = parse.get_parser(
            cmds[command_name],
            parse.explode_line(raw_args),
            dict()
        )

        if parser is not None:
            out = parser.format_help()
            return response.notify(
                kind='INFO',
                code='COMMAND_DESCRIPTION'
            ).kernel(
                commands=out
            ).console(
                out,
                whitespace=1
            ).response

    environ.log_header('Available Commands')
    response.consume(print_module_help())

    return response.fail(
        code='NO_SUCH_COMMAND',
        message='Failed to show command help for "{}"'.format(command_name)
    ).console(
        """
        For more information on the various commands, enter help on the
        specific command:

            help [COMMAND]
        """,
        whitespace_bottom=1
    ).response
1179854
def list_commands(self, **kwargs):
        
        commands = self._commands

        command_id = kwargs.get('CommandId', None)
        if command_id:
            commands = [self.get_command_by_id(command_id)]
        instance_id = kwargs.get('InstanceId', None)
        if instance_id:
            commands = self.get_commands_by_instance_id(instance_id)

        return {
            'Commands': [command.response_object() for command in commands]
        }
250505
async def help(self):
        """"""
        if len(self.args.command) != 2:
            print('Which command do you want help with?', file=sys.stderr)
            return 1

        iface = [interface.RemoteControl,
                 interface.Metadata,
                 interface.Playing,
                 interface.AirPlay,
                 self.__class__,
                 DeviceCommands]
        for cmd in iface:
            for key, value in cmd.__dict__.items():
                if key.startswith('_') or key != self.args.command[1]:
                    continue

                if inspect.isfunction(value):
                    signature = inspect.signature(value)
                else:
                    signature = ' (property)'

                print('COMMAND:\n>> {0}{1}\n\nHELP:\n{2}'.format(
                    key, signature, inspect.getdoc(value)))
        return 0
1230414
def help_message():
    """"""
    parser = autopep8.create_parser()
    string_io = io.StringIO()
    parser.print_help(string_io)
    # Undo home directory expansion.
    return string_io.getvalue().replace(os.path.expanduser('~'), '~')
262921
function getCommandHelps() {
        const cmds = {},
            topics = {},
            result = ['Registered commands:'];
        let keys = {};
        Object.keys(handlers).map((key) => {
            keys[key] = 1;
        });
        Object.keys(helpTopics).map((key) => {
            keys[key] = 1;
        });
        Object.keys(keys).map((key) => {
            if (handlers[key]) {
                cmds[key] = handlers[key].help;
                if (helpTopics[key]) {
                    cmds[key] += ' *';
                }
            } else {
                topics[key] = 'Extended help topic';
            }
        });
        keys = Object.keys(cmds);
        keys.sort();
        keys.forEach((cmd) => result.push(`${cmd}: ${cmds[cmd]}`));
        keys = Object.keys(topics);
        if (keys.length) {
            result.push('');
            result.push('Help Topics:');
            keys.sort();
            keys.forEach((topic) => result.push(`${topic}: ${topics[topic]}`));
        }
        return result.join('\n');
    }
1013538
public function getHelp()
    {
        print Color::head('Help:') . PHP_EOL;
        print Color::colorize('  Lists the commands available in Console') . PHP_EOL . PHP_EOL;

        $this->run([]);
    }
216189
def help_function(self, command=None):
        
        if command:
            return self.registered[command].get(
                'description', 'No help available'
            )
        return ', '.join(sorted(self.registered))
631239
def _show_list_message(resolved_config):
    
    # Show what's available.
    supported_programs = util.get_list_of_all_supported_commands(
        resolved_config
    )
    msg_line_1 = 'Legend: '
    msg_line_2 = (
        '    ' +
        util.FLAG_ONLY_CUSTOM +
        ' only custom files'
    )
    msg_line_3 = (
        '    ' +
        util.FLAG_CUSTOM_AND_DEFAULT +
        ' custom and default files'
    )
    msg_line_4 = '    ' + '  only default files (no symbol)'
    msg_line_5 = ''
    msg_line_6 = 'Programs supported by eg: '

    preamble = [
        msg_line_1,
        msg_line_2,
        msg_line_3,
        msg_line_4,
        msg_line_5,
        msg_line_6
    ]

    complete_message = '\n'.join(preamble)
    complete_message += '\n' + '\n'.join(supported_programs)

    pydoc.pager(complete_message)
627969
private static String showCommandAliases() {
        final Command[] commands = Command.values();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < commands.length; ++i) {
            if (i != 0) {
                sb.append(", ");
                if (i == commands.length - 1) {
                    sb.append("or ");
                }
            }
            sb.append("`--");
            sb.append(commands[i].getAlias());
            sb.append("`");
        }
        return sb.toString();
    }
148775
protected function getCommands()
    {
        $commands = [];

        $routes = $this->map->getRoutes();
        ksort($routes);

        $text = '';
        foreach ($routes as $route) {
            $name    = $route->name;
            $summary = $this->getCommandSummary($route);
            $text .= "    {$name}" . PHP_EOL;
            $text .= "        {$summary}" . PHP_EOL;
        }

        return "<<bold>>COMMANDS<<reset>>" . PHP_EOL
             . "    " . trim($text) . PHP_EOL . PHP_EOL;
    }
1137491
def commands(self):
        
        if self._commands is None:
            self._commands = CommandList(self)
        return self._commands
621459
protected function getDefaultCommands()
  {
    // Keep the core default commands to have the HelpCommand which is used when using the --help option
    $defaultCommands = parent::getDefaultCommands();

    $defaultCommands[] = new ConstantsCommand();
    $defaultCommands[] = new CrudCommand();
    $defaultCommands[] = new NonStaticCommand();
    $defaultCommands[] = new RoutineLoaderCommand();
    $defaultCommands[] = new RoutineWrapperGeneratorCommand();
    $defaultCommands[] = new StratumCommand();

    return $defaultCommands;
  }