function help_drush_command

8.0.x help_drush_command()
master help_drush_command()

Implementation of hook_drush_command().

In this hook, you specify which commands your drush module makes available, what it does and description.

Notice how this structure closely resembles how you define menu hooks.

Return value

An associative array describing your command(s).


commands/core/, line 37


function help_drush_command() {
  $items = array();

  $items['help'] = array(
    'description' => 'Print this help message. See `drush help help` for more options.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
    'allow-additional-options' => TRUE,
    'options' => array(
      'sort' => 'Sort commands in alphabetical order. Drush waits for full bootstrap before printing any commands when this option is used.',
      'filter' => array(
        'description' => 'Restrict command list to those commands defined in the specified file. Omit value to choose from a list of names.',
        'example-value' => 'category',
        'value' => 'optional',
      'format' => 'Format to output . Allowed values are: json, var_export, html.',
      'pipe' => 'A list of available commands, one per line.',
    'arguments' => array(
      'command' => 'A command name, or command alias.',
    'examples' => array(
      'drush' => 'List all commands.',
      'drush --filter=devel_generate' => 'Show only commands defined in',
      'drush help pm-download' => 'Show help for one command.',
      'drush help dl' => 'Show help for one command using an alias.',
    'topics' => array('docs-readme'),
  return $items;