function browse_drush_command

8.0.x browse.drush.inc browse_drush_command()
6.x browse.drush.inc browse_drush_command()
7.x browse.drush.inc browse_drush_command()

Implements hook_drush_command().

File

commands/core/browse.drush.inc, line 6

Code

function browse_drush_command() {
  $items = array();
  $items['browse'] = array(
    'description' => 'Display a link to a given path or open link in a browser.',
    'bootstrap' => DRUSH_BOOTSTRAP_NONE,
    'handle-remote-commands' => TRUE,
    'arguments' => array(
      'path' => 'Path to open. If omitted, the site front page will be opened.',
    ),
    'options' => array(
      'browser' => 'Specify a particular browser (defaults to operating system default). Use --no-brower to suppress opening a browser.',
      'redirect-port' => 'The port that the web server is redirected to (e.g. when running within a Vagrant environment)',
    ),
    'examples' => array(
      'drush browse' => 'Open default web browser (if configured or detected) to the site front page.',
      'drush browse node/1' => 'Open web browser to the path node/1.',
      'drush @example.prod' => 'Open a browser to the web site specified in a site alias.',
      'drush browse --browser=firefox admin' => 'Open Firefox web browser to the path \'admin\'.',
    ),
  );
  return $items;
}