function drush_get_global_options

8.0.x drush.inc drush_get_global_options($brief = FALSE)
6.x drush.inc drush_get_global_options($brief = FALSE)
7.x drush.inc drush_get_global_options($brief = FALSE)
4.x drush.inc drush_get_global_options($brief = FALSE)
5.x drush.inc drush_get_global_options($brief = FALSE)
master drush.inc drush_get_global_options($brief = FALSE)

Get the available global options. Used by help command. Command files may modify this list using hook_drush_help_alter().

Parameters

boolean $brief: Return a reduced set of important options. Used by help command.

Return value

An associative array containing the option definition as the key, and the description as the value, for each of the available options.

1 call to drush_get_global_options()
drush_global_options_command in commands/core/help.drush.inc
Build a fake command for the purposes of showing examples and options.

File

includes/drush.inc, line 342
The drush API implementation and helpers.

Code

function drush_get_global_options($brief = FALSE) {
  $options['root'] = array(
    'short-form' => 'r',
    'description' => dt("Drupal root directory to use (default: current directory)"),
    'example-value' => '<path>',
  );
  $options['uri'] = array(
    'short-form' => 'l',
    'description' => dt('URI of the drupal site to use (only needed in multisite environments or when running on an alternate port)'),
    'example-value' => 'http://example.com:8888',
  );
  $options['verbose'] = array(
    'short-form' => 'v',
    'description' => dt('Display extra information about the command.'),
  );
  $options['debug'] = array(
    'short-form' => 'd',
    'description' => dt('Display even more information, including internal messages.'),
  );
  $options['yes'] = array(
    'short-form' => 'y',
    'description' => dt("Assume 'yes' as answer to all prompts"),
  );
  $options['no'] = array(
    'short-form' => 'n',
    'description' => dt("Assume 'no' as answer to all prompts"),
  );
  $options['simulate'] = array(
    'short-form' => 's',
    'description' => dt("Simulate all relevant actions (don't actually change the system)"),
  );
  $options['pipe'] = array(
    'short-form' => 'p',
    'description' => dt("Emit a compact representation of the command for scripting."),
  );
  $options['help'] = array(
    'short-form' => 'h',
    'description' => dt("This help system."),
  );
  $options['version'] = dt("Show drush version.");
  $options['php'] = dt("The absolute path to your PHP intepreter, if not 'php' in the path.");

  if (!$brief) {
    $options['quiet'] = array(
      'short-form' => 'q',
      'description' => dt('Hide all output'),
    );
    $options['include'] = array(
      'short-form' => 'i',
      'description' => dt("A list of paths to search for drush commands"),
    );
    $options['config'] = array(
      'short-form' => 'c',
      'description' => dt("Specify a config file to use. See example.drushrc.php"),
    );
    $options['user'] = array(
      'short-form' => 'u',
      'description' => dt("Specify a user to login with. May be a name or a number."),
    );
    $options['backend'] = array(
      'short-form' => 'b',
      'description' => dt("Hide all output and return structured data (internal use only)."),
    );
    $options['choice'] = dt("Provide an answer to a multiple-choice prompt.");
    $options['no-label'] = dt("Remove the site label that drush includes in multi-site command output(e.g. `drush @site1,@site2 status`).");
    $options['nocolor'] = dt("Suppress color highlighting on log messages.");
    $options['show-passwords'] = dt("Show database passwords in commands that display connection information.");
    $options['show-invoke'] = dt("Show all function names which could have been called for the current command. See drush_invoke().");
    $options['watchdog'] = dt("Control logging of Drupal's watchdog() to drush log. Recognized values are 'log', 'print', 'disabled'. Defaults to log. 'print' shows calls to admin but does not add them to the log.");
    $options['confirm-rollback'] = array('description' => 'Wait for confirmation before doing a rollback when something goes wrong.');
  }
  return $options;
}