function drush_get_merged_prefixed_options

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

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

2 calls to drush_get_merged_prefixed_options()
drush_sitealias_overlay_options in includes/
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…
drush_sqlsync_sql_sync in commands/sql/


includes/, line 549
The Drush context API implementation.


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;