How to integrate the drush help --filter option with your custom module? You can use the drush help --filter command to present a list of
command categories to view. When you run the command: drush --filter=devel_generate you can see the following output:
All commands in devel_generate: (devel_generate)
 generate-content  Create content.                       
 (genc)                                                  
 generate-menus    Create menus and menu items.          
 (genm)                                                  
 generate-terms    Create terms in specified vocabulary. 
 (gent)                                                  
 generate-users    Create users.                         
 (genu)                                                  
 generate-vocabs   Create vocabularies.                  
 (genv)

You can read in the Drush Command page:

help
Options:  --filter=[category]  Restrict command list to those commands defined in the specified file. Omit value to choose from a list of names.

I create the onlyone.drush.inc file with the following code:
&lt;?php
/**
 * @file
 * Drush commands related to OnlyOne.
 */

/**
* Implements hook_drush_command().
*/
function onlyone_drush_command() {
  $items['onlyone-list'] = array(
    'description' =&gt; dt(&quot;List the configured content types to have Only One node.&quot;),
    'aliases' =&gt; array('ol'),
    'examples' =&gt; array(
      'drush onlyone-list' =&gt; dt(&quot;List the configured content types to have Only One node.&quot;),
    ),
  );
  return $items;
}

/**
 * Callback for the onlyone-list command.
 */
function drush_onlyone_list() {
  $onlyone_content_types = variable_get('onlyone_node_types');

  if (count($onlyone_content_types)) {
    drush_print(dt(&quot;Content types configured to have only one node:&quot;));
    drush_print(implode(&quot;\n&quot;, $onlyone_content_types));
  }
  else {
    drush_print(dt(&quot;There is not content types configured to have only one node.&quot;));
  }
}

I clean the cache with drush cc drush but when I use drush help --filter=onlyone I get this output:
 [error]  The specified command category onlyone does not exist. 

So, how can I obtain the list of the commands defined in my module?
I found the answer searching in the code of the drush project:

If the module have less than 4 commands you can't use the drush --filter=MODULE_NAME because your commands are classified as other:

See the function drush_commands_categorize(), and at line 1125 you can see this comment:

  // Post-process the categories that have no title.
  // Any that have fewer than 4 commands go into a section called "other".


I create 3 more commands and now the drush --filter=onlyone command works.