You are here

function chosen_drush_command in Chosen 7.3

Same name and namespace in other branches
  1. 7.2 drush/chosen.drush.inc \chosen_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.

See `drush topic docs-commands` for a list of recognized keys.

Return value

An associative array describing your command(s).

File

drush/chosen.drush.inc, line 28
drush integration for chosen.

Code

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

  // The key in the $items array is the name of the command.
  $items['chosen-plugin'] = array(
    'callback' => 'drush_chosen_plugin',
    'description' => dt('Download and install the Chosen plugin.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the Chosen plugin. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'chosenplugin',
    ),
  );
  return $items;
}