function drush_command_defaults

8.0.x drush_command_defaults($key, $commandfile, $path)
6.x drush_command_defaults($key, $commandfile, $path)
7.x drush_command_defaults($key, $commandfile, $path)
4.x drush_command_defaults($key, $commandfile, $path)
5.x drush_command_defaults($key, $commandfile, $path)
master drush_command_defaults($key, $commandfile, $path)
3 calls to drush_command_defaults()
drush_get_commands in includes/
Get a list of all implemented commands. This invokes hook_drush_command().
drush_get_global_options in includes/
Get the available global options. Used by help command. Command files may modify this list using hook_drush_help_alter().
drush_global_options_command in commands/core/
Build a fake command for the purposes of showing examples and options.


includes/, line 1047
The drush command engine.


function drush_command_defaults($key, $commandfile, $path) {
  $defaults = array(
    'command' => $key,
    'command-hook' => $key,
    'invoke hooks' => TRUE,
    'callback arguments' => array(),
    'commandfile' => $commandfile,
    'path' => dirname($path),
    'engines' => array(), // Helpful for drush_show_help().
    'callback' => 'drush_command',
    'primary function' => FALSE,
    'description' => NULL,
    'sections' => array(
      'examples' => 'Examples',
      'arguments' => 'Arguments',
      'options' => 'Options',
    'arguments' => array(),
    'required-arguments' => FALSE,
    'options' => array(),
    'sub-options' => array(),
    'allow-additional-options' => FALSE,
    'global-options' => array(),
    'examples' => array(),
    'aliases' => array(),
    'core' => array(),
    'scope' => 'site',
    'drush dependencies' => array(),
    'handle-remote-commands' => FALSE,
    'remote-tty' => FALSE,
    'strict-option-handling' => FALSE,
    'bootstrap_errors' => array(),
    'topics' => array(),
    'hidden' => FALSE,
    'category' => $commandfile,
  // We end up here, setting the defaults for a command, when
  // called from drush_get_global_options().  Early in the Drush
  // bootstrap, there will be no bootstrap object, because we
  // need to get the list of global options when loading config
  // files, and config files are loaded before the bootstrap object
  // is created.  In this early stage, we just use the core global
  // options list.  Later, the bootstrap object can also provide
  // additional defaults if needed.  The bootstrap command defaults
  // will be merged into the command object again just before
  // running it in bootstrap_and_dispatch().
  if ($bootstrap = drush_get_bootstrap_object()) {
    $defaults = array_merge($defaults, $bootstrap->command_defaults());
  return $defaults;