function drush_commandfile_list

8.0.x drush_commandfile_list()
6.x drush_commandfile_list()
7.x drush_commandfile_list()
3.x drush_commandfile_list()
4.x drush_commandfile_list()
5.x drush_commandfile_list()
master 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.
  • All modules in the current Drupal installation whether they are enabled or not. Commands implementing hook_drush_load() in with a return value FALSE will not be loaded.

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

Return value

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

See also


7 calls to drush_commandfile_list()
drush_command_get_includes in includes/
drush_command_implements in includes/
Determine which command files are implementing a hook.
drush_docs_errorcodes in commands/core/
docs-error-codes command. Print a list of all error codes that can be found.
drush_enforce_requirement_drush_dependencies in includes/
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.
drush_get_commands in includes/
Get a list of all implemented commands. This invokes hook_drush_command().

... See full list


includes/, line 951
The drush command engine.


function drush_commandfile_list() {
  return drush_get_context('DRUSH_COMMAND_FILES', array());