function _drush_prepare_command

8.0.x _drush_prepare_command(&$command, $arguments = array())
6.x _drush_prepare_command(&$command, $arguments = array())
7.x _drush_prepare_command(&$command, $arguments = array())
4.x _drush_prepare_command(&$command, $arguments = array())
5.x _drush_prepare_command(&$command, $arguments = array())
master _drush_prepare_command(&$command, $arguments = array())

Called by drush_parse_command(). If a command is dispatched directly by drush_dispatch(), then drush_dispatch() will call this function.

2 calls to _drush_prepare_command()
drush_dispatch in includes/
Given a command record, dispatch it as if it were the original command. Executes in the currently bootstrapped site using the current option contexts. Note that drush_dispatch will not bootstrap any further than the current command has already…
drush_parse_command in includes/
Matches a commands array, as returned by drush_get_arguments, with the current command table.


includes/, line 1359
The drush command engine.


function _drush_prepare_command(&$command, $arguments = array()) {
  // Drush overloads $command['arguments']; save the argument description
  if (!isset($command['argument-description'])) {
    $command['argument-description'] = $command['arguments'];
  // Merge specified callback arguments, which precede the arguments passed on the command line.
  if (isset($command['callback arguments']) && is_array($command['callback arguments'])) {
    $arguments = array_merge($command['callback arguments'], $arguments);
  $command['arguments'] = $arguments;