function drush_commandfile_list

8.0.x command.inc drush_commandfile_list()
6.x command.inc drush_commandfile_list()
7.x command.inc drush_commandfile_list()
3.x command.inc drush_commandfile_list()
4.x command.inc drush_commandfile_list()
5.x command.inc drush_commandfile_list()
master command.inc drush_commandfile_list()

Collect a list of all available drush command files.

Scans the following paths for drush command files:

  • The "/path/to/drush/commands" folder.
  • Folders listed in the 'include' option (see example.drushrc.php).
  • The system-wide drush commands folder, e.g. /usr/share/drush/commands
  • The ".drush" folder in the user's HOME folder.
  • /drush and sites/all/drush in current Drupal site.
  • Folders belonging to enabled modules in the current Drupal site.

A Drush command file is a file that matches "*.drush.inc".

Return value

An associative array whose keys and values are the names of all available command files.

See also

drush_scan_directory()

8 calls to drush_commandfile_list()
commandUnitCase::testCommandVersionSpecific in tests/commandUnitTest.php
Assure that matching version-specific command files are loaded and others are ignored.
drush_command_get_includes in includes/command.inc
drush_command_implements in includes/command.inc
Determine which command files are implementing a hook.
drush_docs_errorcodes in commands/core/docs.drush.inc
docs-errorcodes command. Print a list of all error codes that can be found.
drush_enforce_requirement_drush_dependencies in includes/command.inc
Check that a command has its declared drush dependencies available or have no dependencies. Drush dependencies are helpful when a command is invoking another command, or implementing its API.

... See full list

File

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

Code

function drush_commandfile_list() {
  return commandfiles_cache()->get();
}