function drush_command_get_command_specific_options

8.0.x command.inc drush_command_get_command_specific_options($options, $command_name, $prefix = '')
6.x command.inc drush_command_get_command_specific_options($options, $command_name, $prefix = '')
7.x command.inc drush_command_get_command_specific_options($options, $command_name, $prefix = '')
master command.inc drush_command_get_command_specific_options($options, $command_name, $prefix = '')

Return all of the command-specific options defined in the given options set for the specified command name. Note that it is valid to use the command name alias rather than the primary command name, both in the parameter to this function, and in the options set.

1 call to drush_command_get_command_specific_options()
drush_backend_invoke_concurrent in includes/backend.inc
Execute a new local or remote command in a new process.

File

includes/command.inc, line 1704
The drush command engine.

Code

function drush_command_get_command_specific_options($options, $command_name, $prefix = '') {
  $result = array();
  $command_name = drush_command_normalize_name($command_name);
  if (isset($options[$prefix . 'command-specific'])) {
    foreach ($options[$prefix . 'command-specific'] as $options_for_command => $values) {
      if ($command_name == drush_command_normalize_name($options_for_command)) {
        $result = array_merge($result, $values);
      }
    }
  }
  return $result;
}