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.
  • All modules in the current Drupal installation whether they are enabled or not. Commands implementing hook_drush_load() in MODULE.drush.load.inc with a return value FALSE will not be loaded.

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()

5 calls to drush_commandfile_list()
drush_command_implements in includes/command.inc
Determine which command files are implementing a hook.
drush_command_include in includes/command.inc
Conditionally include files based on the command used.
drush_get_commands in includes/command.inc
Get a list of all implemented commands. This invokes hook_drush_command().
drush_get_engines in includes/drush.inc
Return a structured array of engines of a specific type from commandfiles implementing hook_drush_engine_$type.
drush_invoke in includes/command.inc
Invoke drush api calls.

File

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

Code

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