diff --git a/includes/drush.inc b/includes/drush.inc
index 5be9125..f680c64 100644
--- a/includes/drush.inc
+++ b/includes/drush.inc
@@ -642,8 +642,10 @@ function drush_choice($options, $prompt = 'Enter a number.', $label = '!value',
  *   in the return value). If this is an empty array (default), then a built in
  *   final option of "Done" will be added to the available options (in this case
  *   no additional keys are added to the return value).
+ * @param $select_all
+ *   Whether to add a select or deselect all option to the list.
  */
-function drush_choice_multiple($options, $defaults = FALSE, $prompt = 'Select some numbers.', $label = '!value', $mark = '!value (selected)', $min = 0, $max = NULL, $final_options = array()) {
+function drush_choice_multiple($options, $defaults = FALSE, $prompt = 'Select some numbers.', $label = '!value', $mark = '!value (selected)', $min = 0, $max = NULL, $final_options = array(), $select_all = FALSE) {
   $selections = array();
   // Load default selections.
   if (is_array($defaults)) {
@@ -654,6 +656,9 @@ function drush_choice_multiple($options, $defaults = FALSE, $prompt = 'Select so
   }
   $complete = FALSE;
   $final_builtin = array();
+  if ($select_all) {
+    $final_builtin['select_all'] = dt('Select all');
+  }
   if (empty($final_options)) {
     $final_builtin['done'] = dt('Done');
   }
@@ -676,13 +681,18 @@ function drush_choice_multiple($options, $defaults = FALSE, $prompt = 'Select so
     if (count($selections) >= $min && empty($final_options) && $toggle == 'done') {
       return $selections;
     }
-    // Toggle the selected value.
-    $item = array_search($toggle, $selections);
-    if ($item === FALSE) {
-      array_unshift($selections, $toggle);
+    if ($toggle == 'select_all') {
+      $selections = (count($selections) == 0) ? array_keys($options) : array();
     }
     else {
-      unset($selections[$item]);
+      // Toggle the selected value.
+      $item = array_search($toggle, $selections);
+      if ($item === FALSE) {
+        array_unshift($selections, $toggle);
+      }
+      else {
+        unset($selections[$item]);
+      }
     }
     // If the user selected one of the final options, return.
     if (count($selections) >= $min && in_array($toggle, $final_options_keys)) {
