You are here

function unused_modules_drush_command in Unused Modules 8

Same name and namespace in other branches
  1. 6 unused_modules.drush.inc \unused_modules_drush_command()
  2. 7 unused_modules.drush.inc \unused_modules_drush_command()

Implements hook_drush_command().

File

./unused_modules.drush.inc, line 10
Unused Modules Drush support.

Code

function unused_modules_drush_command() {
  $items = [];
  $items['unused-modules'] = [
    'description' => 'Show unused modules or projects.',
    'aliases' => [
      'um',
      'unused_modules',
    ],
    'arguments' => [
      'type' => 'Options "projects" and "modules". Show modules or projects (defaults to projects).',
      'show' => 'Options "all" and "disabled". Show only disabled modules (defaults to disabled).',
    ],
    'examples' => [
      'Show projects that are unused.' => 'drush unused-modules projects disabled',
      'As above, shorthand.' => 'drush um',
      'As above, include projects with enabled modules.' => 'drush unused-modules projects disabled',
      'Show modules that are unused.' => 'drush unused-modules modules disabled',
      'As above, include enabled modules.' => 'drush unused-modules modules all',
    ],
  ];
  return $items;
}