function drush_command_get_includes

8.0.x command.inc drush_command_get_includes($command)
6.x command.inc drush_command_get_includes($command)
7.x command.inc drush_command_get_includes($command)
4.x command.inc drush_command_get_includes($command)
5.x command.inc drush_command_get_includes($command)
master command.inc drush_command_get_includes($command)
2 calls to drush_command_get_includes()
drush_command_include in includes/command.inc
Conditionally include files based on the command used.
drush_docs_errorcodes in commands/core/docs.drush.inc
docs-errorcodes command. Print a list of all error codes that can be found.

File

includes/command.inc, line 1607
The drush command engine.

Code

function drush_command_get_includes($command) {
  $include_files = array();
  $parts = explode('-', $command);
  $command = implode(".", array_reverse($parts));

  $commandfiles = drush_commandfile_list();
  $options = array();
  foreach ($commandfiles as $commandfile => $file) {
    $filename = sprintf("%s/%s.inc", dirname($file), $command);
    if (file_exists($filename)) {
      $include_files[$filename] = $commandfile;
    }
  }
  return $include_files;
}