function policy_drush_help_alter

8.0.x policy.drush.inc policy_drush_help_alter($command)
6.x policy.drush.inc policy_drush_help_alter($command)
7.x policy.drush.inc policy_drush_help_alter($command)
5.x policy.drush.inc policy_drush_help_alter($command)

Implement hook help alter.

When a hook extends a command with additional options, it must implement help alter and declare the option(s). Doing so will add the option to the help text for the modified command, and will also allow the new option to be specified on the command line. Without this, Drush will fail with an error when a user attempts to use the option.

File

examples/policy.drush.inc, line 40
Example policy commandfile. Modify as desired.

Code

function policy_drush_help_alter($command) {
  if ($command['command'] == 'updatedb') {
    $command['options']['token'] = 'Per site policy, you must specify a token in the --token option for all commands.';
  }
}