Perform a full load of the command table to get all the reserved command words.
433517
def load_full_command_table(self):
        
        load_cmd_tbl_func = self.kwargs.get('load_cmd_tbl_func', lambda _: {})
        cache_reserved_commands(load_cmd_tbl_func)
        telemetry.set_full_command_table_loaded()
443058
def ListCommands(self):
    """"""
    print 'Available commands:'
    commands = dict(self.commands)
    for plugin in self.plugins:
      commands.update(plugin.commands)
    for com in sorted(commands):
      if not com.startswith('_'):
        self.PrintHelpTextLine(com, commands[com])
362240
def _get_select_commands(self, source, tables):
        
        # Create dictionary of select queries
        row_queries = {tbl: self.select_all(tbl, execute=False) for tbl in
                       tqdm(tables, total=len(tables), desc='Getting {0} select queries'.format(source))}

        # Convert command strings into lists of commands
        for tbl, command in row_queries.items():
            if isinstance(command, str):
                row_queries[tbl] = [command]

        # Pack commands into list of tuples
        return [(tbl, cmd) for tbl, cmds in row_queries.items() for cmd in cmds]
1108709
def get_all(self):
        """"""
        logger.debug('Fetching items. Table: {namespace}'.format(
            namespace=self.namespace
        ))

        rows = []

        result = self.table.scan()

        while True:
            next_token = result.get('LastEvaluatedKey', None)
            rows += result['Items']

            if next_token:
                result = self.table.scan(ExclusiveStartKey=next_token)
            else:
                break

        return rows
840444
def get_commands_aliases_and_macros_for_completion(self) -> List[str]:
        """"""
        visible_commands = set(self.get_visible_commands())
        alias_names = set(self.get_alias_names())
        macro_names = set(self.get_macro_names())
        return list(visible_commands | alias_names | macro_names)
662051
def get_ingredients(self):
        """"""
        return [
            cmdtree.CommandTreeBuilder(self.command),
            cmdtree.CommandTreeDispatcher(),
            argparse.AutocompleteIngredient(),
            argparse.ParserIngredient(),
            crash.VerboseCrashHandler(),
            ansi.ANSIIngredient(),
            log.Logging(),
        ]
867375
def get_visible_commands(self) -> List[str]:
        """"""
        commands = self.get_all_commands()

        # Remove the hidden commands
        for name in self.hidden_commands:
            if name in commands:
                commands.remove(name)

        # Remove the disabled commands
        for name in self.disabled_commands:
            if name in commands:
                commands.remove(name)

        return commands
417449
function getCommandNames(cmds) {
  var commands = _.map(cmds, '_name');
  commands = commands.concat.apply(commands, _.map(cmds, '_aliases'));
  commands.sort();
  return commands;
}
1285962
public Collection<String> getCommands() {
        List<String> commands = new ArrayList<String>();
        for (String cmdOwner : m_cmdsByOwnerMap.keySet()) {
            SortedMap<String, RESTCommand> ownerCmdMap = m_cmdsByOwnerMap.get(cmdOwner);
            for (String name : ownerCmdMap.keySet()) {
                RESTCommand cmd = ownerCmdMap.get(name);
                commands.add(String.format("%s: %s = %s", cmdOwner, name, cmd.toString()));
            }
        }
        return commands;
    }
487190
def get_summaries(ordered=True):
    """"""

    if ordered:
        cmditems = _sort_commands(commands_dict, commands_order)
    else:
        cmditems = commands_dict.items()

    for name, command_class in cmditems:
        yield (name, command_class.summary)
411682
def selected_shells(command):
    """"""
    if not command or command == '*':
        for i in dispatchers.all_instances():
            yield i
        return
    selected = set()
    instance_found = False
    for pattern in command.split():
        found = False
        for expanded_pattern in expand_syntax(pattern):
            for i in dispatchers.all_instances():
                instance_found = True
                if fnmatch(i.display_name, expanded_pattern):
                    found = True
                    if i not in selected:
                        selected.add(i)
                        yield i
        if instance_found and not found:
            console_output('{} not found\n'.format(pattern).encode())
823359
private function getAvailableCommands()
    {
        $commands = $this->getDefaultPiwikCommands();
        $detected = PluginManager::getInstance()->findMultipleComponents('Commands', 'Piwik\\Plugin\\ConsoleCommand');

        $commands = array_merge($commands, $detected);

        /**
         * Triggered to filter / restrict console commands. Plugins that want to restrict commands
         * should subscribe to this event and remove commands from the existing list.
         *
         * **Example**
         *
         *     public function filterConsoleCommands(&$commands)
         *     {
         *         $key = array_search('Piwik\Plugins\MyPlugin\Commands\MyCommand', $commands);
         *         if (false !== $key) {
         *             unset($commands[$key]);
         *         }
         *     }
         *
         * @param array &$commands An array containing a list of command class names.
         */
        Piwik::postEvent('Console.filterCommands', array(&$commands));

        $commands = array_values(array_unique($commands));

        return $commands;
    }
124261
def load_all(self):
        '''
        
        '''
        # check for custom conf file before loading conf
        self._load_command_line(conf_only=True)
        self._load_config_file()
        self._load_env()
        self._load_command_line()
        self._imply_options()
        self._validate_options()
        return self
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');
    }
733198
def get_commands_from(self, args):
        
        commands = []
        for i in itertools.count(0):
            try:
                commands.append(getattr(args, self.arg_label_fmt % i))
            except AttributeError:
                break
        return commands
1193280
public static function allCustom()
    {
        // Response array
        $commands = [];

        // Loop through PHP files
        $dir = app_path('Console/Commands');
        if (!is_dir($dir)) return [];
        $files = scandir($dir);
        foreach ($files as $file) {
            if (!preg_match('#\w+\.php#', $file)) {
                continue;
            }

            // Build an instance of a command using the service container
            $path = $dir.'/'.$file;
            $class = 'App\Console\Commands\\'.basename($path, '.php');
            $command = app($class);

            // Validate command
            if (!is_a($command, 'Illuminate\Console\Command')) {
                continue;
            }

            // Get namespace
            $name = $command->getName();
            if (strpos($name, ':')) {
                list($namespace, $name) = explode(':', $name);
            } else {
                $namespace = 'misc';
            }

            // Massage name
            $name = str_replace('-', ' ', ucfirst($name));

            // Group commands by namespace
            $namespace = ucfirst($namespace);
            $name = ucfirst($name);
            if (!array_key_exists($namespace, $commands)) {
                $commands[$namespace] = [];
            }
            $commands[$namespace][$name] = $command;
        }

        // Return
        return $commands;
    }
794989
def _help_commands(self):
        
        help =  'Workbench Commands:'
        for command in self.list_all_commands():
            full_help = self.work_request('help_formatter', command)['help_formatter']['help']
            compact_help = full_help.split('\n')[:2]
            help += '\n\n%s' % '\n'.join(compact_help)
        return help