3

I just read the Drush Topic - A Wealth of Information article about the topic section in drush commands and I have added this topic to my drush commands:

  $items['docs-onlyone'] = array(
    'description' => 'Info about Only One.',
    'hidden' => TRUE,
    'topic' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    'callback' => 'drush_print_file',
    'callback arguments' => array(dirname(__FILE__) . '/README.txt'),
  );

The problem is that the only way to see the new topic in the topic list once I use the drush topic command is if I place my onlyone.drush.inc file inside the .drush folder.

Is this normal? I can't see the topic if I have my onlyone.drush.inc file inside my module folder.

2

Make sure that you have selected the Drupal site that your module is in (e.g. with an @alias, via --root and --uri, or cd /path/to/drupal/sites/default), and also ensure that the module is enabled. Otherwise, Drush will not find and load the file.

  • if I use drush help mycommand I can see the topic section, the module is enable, but I can't see the topic in the drush topic command, if I call drush docs-onlyone the command works fine. – Adrian Cid Almaguer Oct 14 '16 at 20:22
  • Sounds like a Drush bug. Try different major versions of Drush, and report results in the Drush issue queue. – greg_1_anderson Oct 15 '16 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.