function drush_show_help

8.0.x help.drush.inc drush_show_help($commandstring)
6.x help.drush.inc drush_show_help($commandstring)
7.x help.drush.inc drush_show_help($commandstring)
3.x drush.inc drush_show_help($commands)
4.x drush.inc drush_show_help($commandstring)
5.x help.drush.inc drush_show_help($commandstring)

Prints out help for a given command.

2 calls to drush_show_help()
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.
drush_help_html in commands/core/help.drush.inc
Return an HTML page documenting all available commands and global options.

File

includes/drush.inc, line 375
The drush API implementation and helpers.

Code

function drush_show_help($commandstring) {
  // First check and see if the command can already be found.
  $commands = drush_get_commands();
  if (!array_key_exists($commandstring, $commands)) {
    // If the command cannot be found, then bootstrap so that
    // additional commands will be brought in.
    // For speed, only bootstrap up to DRUSH_BOOTSTRAP_DRUPAL_SITE.
    drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_SITE);
    $commands = drush_get_commands();
  }
  if (array_key_exists($commandstring, $commands)) {
    $command = $commands[$commandstring];
    drush_print_help($command);
    return TRUE;
  }
  return drush_set_error('DRUSH_COMMAND_NOT_FOUND', dt('Invalid command !command.', array('!command' => $commandstring)));
}