function hook_drush_help_alter

8.0.x drush.api.php hook_drush_help_alter(&$command)
6.x drush.api.php hook_drush_help_alter(&$command)
7.x drush.api.php hook_drush_help_alter(&$command)
4.x drush.api.php hook_drush_help_alter(&$command)
5.x drush.api.php hook_drush_help_alter(&$command)
master drush.api.php hook_drush_help_alter(&$command)

Add help components to a command.

16 functions implement hook_drush_help_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

core_drush_help_alter in commands/core/core.drush.inc
Implements hook_drush_help_alter().
druplicon_drush_help_alter in commands/core/druplicon.drush.inc
Implements hook_drush_help_alter().
image_drush_help_alter in commands/core/image.drush.inc
Implements hook_drush_help_alter().
magic_drush_help_alter in tests/hooks/magic_help_alter/magic.drush.inc
Implement hook_drush_help_alter()
notify_drush_help_alter in commands/core/notify.drush.inc
Implements hook_drush_help_alter().

... See full list

File

./drush.api.php, line 291
Documentation of the Drush API.

Code

function hook_drush_help_alter(&$command) {
  if ($command['command'] == 'sql-sync') {
    $command['options']['myoption'] = "Description of modification of sql-sync done by hook";
    $command['sub-options']['sanitize']['my-sanitize-option'] = "Description of sanitization option added by hook (grouped with --sanitize option)";
  }
  if ($command['command'] == 'global-options') {
    // Recommended: don't show global hook options in brief global options help.
    if ($command['#brief'] === FALSE) {
      $command['options']['myglobaloption'] = 'Description of option used globally in all commands (e.g. in a commandfile init hook)';
    }
  }
}