? includes/table.inc
Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.131
diff -u -p -r1.131 pm.drush.inc
--- commands/pm/pm.drush.inc	27 Oct 2010 18:32:19 -0000	1.131
+++ commands/pm/pm.drush.inc	29 Oct 2010 19:16:44 -0000
@@ -153,6 +153,8 @@ function pm_drush_command() {
       '--type' => 'Filter by project type. Choices: module, theme.',
       '--status' => 'Filter by project status. Choices: enabled,disable and/or \'not installed\'. You can use multiple comma separated values. (i.e. --status="disabled,not installed").',
       '--package' => 'Filter by project packages. You can use multiple comma separated values. (i.e. --package="Core - required,Other").',
+      '--core' => 'Filter out projects that are not in core.',
+      '--contrib' => 'Filter out core packages.',
       '--pipe' => 'Returns a space delimited list of the names of the resulting projects.',
     ),
     'aliases' => array('sm'),
@@ -296,6 +298,20 @@ function drush_pm_list() {
     if (($major_version >= 6) and (isset($project->info['hidden']))) {
       continue;
     }
+    
+    // filter out core if --contrib specified
+    if (drush_get_option('contrib', FALSE)) {
+      if (strcasecmp("Core ", substr($project->info['package'], 0, 5)) == 0) {
+        continue;
+      }
+    }
+    
+    // filter out non-core if --core specified
+    if (drush_get_option('core', FALSE)) {
+      if (strcasecmp("Core ", substr($project->info['package'], 0, 5)) != 0) {
+        continue;
+      }
+    }
 
     // filter by package
     if (!empty($package_filter)) {
