wp-cli/wp-cli — pull request #642 by danielbachhuber (2013-10-30 01:47:59+00:00)
Title: Discoverability for fourth level commands provided by plugins

Most of the core commands in WP-CLI are third-level commands in the format

`wp [singular-noun] [action]`

Example:

`wp post create`

I want the commands provided by my plugin to follow this pattern, but prefixed with the plugin name. Each command becomes a fourth-level command. Example:

`wp crontrol event list` and `wp crontrol event delete`

The problem is I can't use this format because a fourth-level command isn't discoverable via `wp crontrol`. It'll only list `wp crontrol event` as an available command, and the user needs to type `wp help crontrol event` in order to see the available event commands. Tab completion isn't available for fourth level commands either.

My plugin currently implements the commands thus:

`wp crontrol list-events` and `wp crontrol delete-event`

which is less than ideal because it deviates from WP-CLI's conventions for command naming.

What can be done to improve this?