function drush_get_merged_prefixed_options

8.0.x context.inc drush_get_merged_prefixed_options($prefix)
6.x context.inc drush_get_merged_prefixed_options($prefix)
7.x context.inc drush_get_merged_prefixed_options($prefix)
5.x context.inc drush_get_merged_prefixed_options($prefix)
master context.inc drush_get_merged_prefixed_options($prefix)

Retrieves a collapsed list of all options with a specified prefix.

1 call to drush_get_merged_prefixed_options()
drush_sitealias_overlay_options in includes/sitealias.inc
Given an alias record, overwrite its values with options from the command line and other drush contexts as specified by the provided prefix. For example, if the prefix is 'source-', then any option 'source-foo' will set the value…

File

includes/context.inc, line 544
The Drush context API implementation.

Code

function drush_get_merged_prefixed_options($prefix) {
  $merged_options = drush_get_merged_options();
  $result = array();
  foreach ($merged_options as $key => $value) {
    if ($prefix == substr($key, 0, strlen($prefix))) {
      $result[substr($key, strlen($prefix))] = $value;
    }
  }

  return $result;
}