function core_drush_help

8.0.x core.drush.inc core_drush_help($section)
6.x core.drush.inc core_drush_help($section)
7.x core.drush.inc core_drush_help($section)
3.x core.drush.inc core_drush_help($section)
4.x core.drush.inc core_drush_help($section)
5.x core.drush.inc core_drush_help($section)
master core.drush.inc core_drush_help($section)

Implementation of hook_drush_help().

This function is called whenever a drush user calls 'drush help <name-of-your-command>'

Parameters

A string with the help section (prepend with 'drush:'):

Return value

A string with the help text for your command.

File

commands/core/core.drush.inc, line 363
Core drush commands.

Code

function core_drush_help($section) {
  switch ($section) {
    case 'drush:help':
      return dt('Execute a drush command. Run `drush help [command]` to view command-specific help.');
    case 'drush:cron':
      return dt("Runs all cron hooks in all active modules for specified site.");
    case 'drush:status':
      return dt("View the Drupal version and DB credentials for the current site.");
    case 'drush:php-script':
      return dt("Runs the given php script(s) after a full Drupal bootstrap. A useful alternative to eval command when your php is lengthy or you can't be bothered to figure out bash quoting. if you plan to share a script with others, consider making a full drush command instead since thats more self-documenting.");
    case 'drush:cache-clear':
      return dt("Delete a specific drupal cache, or all caches.");
    case 'drush:search-status':
      return dt("Show how many items remain to be indexed for search, and the total number of items.");
    case 'drush:search-index':
      return dt("Index the remaining search items.");
    case 'drush:search-reindex':
      return dt("Force the search index to be rebuilt.");
    case 'drush:updatedb':
      return dt("Run update.php just as a web browser would.");
    case 'drush:rsync':
      return dt("Sync the entire drupal directory or a subdirectory to a <destination> using ssh. Excludes .svn directories. Useful for pushing copies of your tree to a staging server, or retrieving a files directory from a remote site. Local paths should be specified relative to Drupal root.");
    case 'drush:php-eval':
      return dt("Run arbitrary PHP code in the context of Drupal");
    case 'drush:site-install':
      return dt("Install Drupal using specified install profile.");
    case 'drush:drupal-directory':
      return dt("Return the filesystem path for projects/themes and other key folders. Used by `cli` command for handy commands `cdd` and `lsd`. If you want to use this command directly, you usually want to prefix the command with cd and enclose the command invocation in backticks. See Examples below.");
    case 'drush:core-cli':
      return dt("Enter a new shell optimized for drush use.  See help for more details.");
    case 'error:DRUSH_DRUPAL_DB_ERROR':
      $message = dt("Drush was not able to start (bootstrap) the Drupal database.\n");
      $message .= dt("Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.\n");
      $message .= dt("\nDrush was attempting to connect to : \n!credentials\n", array('!credentials' => _core_site_credentials()));
      $message .= dt("You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or \$options['uri'] in your drushrc.php file.\n");
      return $message;
    case 'error:DRUSH_DRUPAL_BOOTSTRAP_ERROR':
      $message = dt("Drush was not able to start (bootstrap) Drupal.\n");
      $message .= dt("Hint: This error can only occur once the database connection has already been successfully initiated, therefore this error generally points to a site configuration issue, and not a problem connecting to the database.\n");
      $message .= dt("\nDrush was attempting to connect to : \n!credentials\n", array('!credentials' => _core_site_credentials()));
      $message .= dt("You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or \$options['uri'] in your drushrc.php file.\n");
      return $message;
      break;
  }
}