The following uses the watchdog-show command as an example but it applies to all commands.
With an aliases file, named test.aliases.drushrc.php, containing the following definitions
$aliases['group'] = array(
'site-list' => array('@a', '@b',),
);
$aliases['a'] = array (
'uri' => 'www.example.com.a',
'root' => 'D:/web sites/drupal7',
'command-specific' => array(
'watchdog-show' => array('count' => '1',),
),
);
$aliases['b'] = array (
'uri' => 'www.example.com.b',
'root' => 'D:/web sites/drupal7',
'command-specific' => array(
'watchdog-show' => array('count' => '2',),
),
);
the following commands perform as expected, listing one and two log entries respectively.
drush @a watchdog-show
drush @b watchdog-show
However the following commands ignore the command-specific options in the alias file and list the default 10 log entries
drush @group watchdog-show
drush @test watchdog-show
The documentation in example.aliases.drushrc.php says
These options will only be set if the alias is used with the specified command
It would seem more helpful to me if these options were set when a group alias was used as well as when a site alias is used. If there is a reason why that is a bad idea then making clearer the limitations of group aliases would be good.
Comments
Comment #1
moshe weitzman commentedSounds like a bug to me. Lets see what Greg thinks.
Comment #2
greg.1.anderson commentedThis is a limitation - but I'm fine with calling it a bug and coming up with a solution. Shouldn't be too hard; I'll work on it.
Comment #3
greg.1.anderson commentedHere is a patch that fixed this problem, and allows command-specific to work in alias lists. It is not quite as simple as it may seem, though; I had to remove a spurrious call to drush_set_config_special_contexts(), that should not be happening in drush_sitealias_get_record. I also added 'never-propagate' to the global 'php' and 'php-options' options, which, strictly speaking, is unrelated to this issue, but as long as I am here...
Running the test suite now.
Comment #4
greg.1.anderson commentedTests are passing.
Comment #5
moshe weitzman commentedpatch failed to apply
Comment #6
greg.1.anderson commentedRerolled.
Comment #7
moshe weitzman commentedCommitted. Thanks.