function drush_get_command_options_extended

master drush_get_command_options_extended($command)

Return the list of all of the options for the given command record including options provided by engines and additional-options.

Related topics

1 call to drush_get_command_options_extended()
drush_redispatch_get_options in includes/
Get the options that were passed to the current command.


includes/, line 721
The drush command engine.


function drush_get_command_options_extended($command) {

  // Start out with just the options in the current command record.
  $options = _drush_get_command_options($command);
  // If 'allow-additional-options' contains a list of command names,
  // then union together all of the options from all of the commands.
  if (is_array($command['allow-additional-options'])) {
    $implemented = drush_get_commands();
    foreach ($command['allow-additional-options'] as $subcommand_name) {
      if (array_key_exists($subcommand_name, $implemented)) {
        $options = array_merge($options, _drush_get_command_options($implemented[$subcommand_name]));
  return $options;