function drush_hyphenate_options

8.0.x complete.inc drush_hyphenate_options($options)
6.x complete.inc drush_hyphenate_options($options)
7.x complete.inc drush_hyphenate_options($options)
5.x complete.inc drush_hyphenate_options($options)
master complete.inc drush_hyphenate_options($options)

Simple helper function to ensure options are properly hyphenated before we return them to the user (we match against the non-hyphenated versions internally).

Parameters

array $options: Array of unhyphenated option names.

Return value

array Array of hyphenated option names.

1 call to drush_hyphenate_options()
drush_early_complete in includes/complete.inc
Produce autocomplete output.

File

includes/complete.inc, line 393
Provide completion output for shells.

Code

function drush_hyphenate_options($options) {
  foreach ($options as $key => $option) {
    $options[$key] = '--' . ltrim($option, '--');
  }
  return $options;
}