How can a Drupal module retrieve the list of Drush commands programmatically from within a Controller or .module file?

45 Views Asked by At

What is the way to programmatically retrieve the list of Drush commands defined by core or contributed modules in a custom Drupal 9 or Drupal 10 module?

For example: I have a custom module and now I want to get the list of all the drush commands in my custom module defined by other modules whether they are part of Drupal core or contributed modules.

Thanks

0

There are 0 best solutions below