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

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

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;
  }
  $shell_aliases = drush_get_context('shell-aliases', array());
  if (array_key_exists($commandstring, $shell_aliases)) {
    $msg = dt("'@alias-name' is a shell alias.  Its value is: !name. See `drush topic docs-shell-aliases` and `drush shell-alias` for more information.", array('@alias-name' => $commandstring, '!name' => $shell_aliases[$commandstring]));
    drush_log($msg, 'ok');
    return TRUE;
  }
  return drush_set_error('DRUSH_COMMAND_NOT_FOUND', dt('Invalid command !command.', array('!command' => $commandstring)));
}