function drush_pm_info

8.0.x info.pm.inc drush_pm_info()
6.x info.pm.inc drush_pm_info()
7.x info.pm.inc drush_pm_info()
3.x pm.drush.inc drush_pm_info()
4.x pm.drush.inc drush_pm_info()
5.x info.pm.inc drush_pm_info()
master info.pm.inc drush_pm_info()

Command callback. Show detailed info for one or more extensions.

File

commands/pm/info.pm.inc, line 6

Code

function drush_pm_info() {
  $args = pm_parse_arguments(func_get_args());

  $extension_info = drush_get_extensions(FALSE);
  _drush_pm_expand_extensions($args, $extension_info);
  // If no extensions are provided, show all.
  if (count($args) == 0) {
    $args = array_keys($extension_info);
  }

  foreach ($args as $extension) {
    if (isset($extension_info[$extension])) {
      $info = $extension_info[$extension];
    }
    else {
      drush_log(dt('!extension was not found.', array('!extension' => $extension)), 'warning');
      continue;
    }
    if ($info->type == 'module') {
      $data = _drush_pm_info_module($info);
    }
    else {
      $data = _drush_pm_info_theme($info);
    }
    drush_print_table(drush_key_value_to_array_table($data));
    print "\n";
  }
}