function drush_help_listing_print

8.0.x help.drush.inc drush_help_listing_print($command_categories, $format)
6.x help.drush.inc drush_help_listing_print($command_categories, $format)
7.x help.drush.inc drush_help_listing_print($command_categories, $format)
5.x help.drush.inc drush_help_listing_print($command_categories, $format)
master help.drush.inc drush_help_listing_print($command_categories)

Print CLI table or HTML table listing all commands.

1 call to drush_help_listing_print()
drush_core_help in commands/core/help.drush.inc
Command callback for help command. This is the default command, when none other has been specified.

File

commands/core/help.drush.inc, line 441

Code

function drush_help_listing_print($command_categories, $format) {
  $all_commands = array();
  foreach ($command_categories as $key => $info) {
    // Get the commands in this category.
    $commands = $info['commands'];

    // Build rows for drush_print_table().
    $rows = array();
    foreach ($commands as $cmd => $command) {
      $name = $command['aliases'] ? $cmd . ' (' . implode(', ', $command['aliases']) . ')' : $cmd;
      $rows[$cmd] = array(
        'name' => $name,
        'description' => $command['description'],
      );
    }

    // Vary the output by mode: CLI or HTML
    if ($format == 'html') {
      drush_print("<h3>" . $info['title'] . "</h3>");
      drush_print(drush_help_html_command_list($commands));
    }
    else {
      drush_print($info['title'] . ": (" . $key . ")");
      drush_print_table($rows, FALSE, array('name' => 20));
    }
  }
}