Drupal - How to show available drush commands per module with a drush command?
You can use the --filter
feature of Drush. For example, you can use drush --filter=features
to get all the commands available from the Features module, or drush --filter=views
to get all the Drush commands available from the Views module.
You could then also pipe that output into a file if you wanted (e.g. drush --filter=views > views_drush_commands.txt
).
You can find the docs on the Drush homepage.
If the module have less than 4 commands you can't use the drush --filter=MODULE_NAME
because you will obtain the following message:
[error] The specified command category onlyone does not exist.
In this case you can use drush --filter
and select the number that correspond with Other commands (usually at the end of the list).
You can read more about this behavior in: How to integrate the drush help --filter option with your custom module?