Skip to content

Commit

Permalink
drush-ops#52: Simplify code to automatically set the label separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson authored and mradcliffe committed Sep 12, 2013
1 parent 3e78881 commit 65d3cd3
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions includes/drush.inc
Expand Up @@ -1197,17 +1197,12 @@ function drush_preflight_command_dispatch() {
// name will be consistant.
$format = drush_get_option('format', FALSE);
if ($format) {
$implemented = drush_get_commands();
if (array_key_exists($command_name, $implemented)) {
$command = $implemented[$command_name];
if ($command) {
$result = drush_load_command_engines($command);
$formatter = drush_get_outputformat();
if (!array_key_exists('label-separator', $multi_options)) {
$list_separator = $formatter->get_info('list-separator');
if ($list_separator) {
$multi_options['label-separator'] = $list_separator;
}
if (!array_key_exists('label-separator', $multi_options)) {
$formatter = drush_load_engine('outputformat', $format);
if ($formatter) {
$list_separator = $formatter->get_info('list-separator');
if ($list_separator) {
$multi_options['label-separator'] = $list_separator;
}
}
}
Expand Down

0 comments on commit 65d3cd3

Please sign in to comment.