You are here

function markdown_drush_command in Markdown 8

Same name and namespace in other branches
  1. 8.2 markdown.drush.inc \markdown_drush_command()
  2. 7.2 drush/markdown.drush.inc \markdown_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/markdown.drush.inc, line 29
drush integration for markdown filter.

Code

function markdown_drush_command() {
  $items = [];

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