cli.drush.inc

  1. 8.0.x commands/core/cli.drush.inc
  2. 7.x commands/core/cli.drush.inc
  3. master commands/core/cli.drush.inc

Functions

Namesort descending Description
cli_drush_command Implements hook_drush_command().
drush_cli_core_cli Command callback.

File

commands/core/cli.drush.inc
View source
  1. <?php
  2. /**
  3. * Implements hook_drush_command().
  4. */
  5. function cli_drush_command() {
  6. $items['core-cli'] = array(
  7. 'description' => 'Open an interactive shell on a Drupal site.',
  8. 'remote-tty' => TRUE,
  9. 'aliases' => array('php'),
  10. 'bootstrap' => DRUSH_BOOTSTRAP_MAX,
  11. );
  12. return $items;
  13. }
  14. /**
  15. * Command callback.
  16. */
  17. function drush_cli_core_cli() {
  18. $boris = new \Boris\Boris(drush_sitealias_bootstrapped_site_name() . '> ');
  19. // Use the Symfony var-dumper to inspect variables.
  20. $boris->setInspector(new \Drush\Boris\VarDumperInspector());
  21. // Boris will never return control to us, but our shutdown
  22. // handler will still run after the user presses ^D. Mark
  23. // this command as completed to avoid a spurious error message.
  24. drush_set_context('DRUSH_EXECUTION_COMPLETED', TRUE);
  25. $boris->start();
  26. }