wp-cli/wp-cli — pull request #551 by scribu (2013-08-01 15:10:49+00:00)
Title: Replace WP_CLI::add_man_dir() with something better

Follow-up to #548:

I'm not really sure why I chose to introduce a standalone method for specifying additional doc directories; I guess the dispatcher architecture was too intimidating at the time.

The problem is that, since doc directories aren't associated to command classes, we have to search through all of them. For example, if you have 5 custom commands installed, each with its own `WP_CLI::add_man_dir()` call, whenever you invoke `wp help `, WP-CLI will potentially have to look through all of the 5 directories, instead of just one.

It's clear now that it makes more sense to have an optional parameter in `WP_CLI::add_command()`:

```php
WP_CLI::add_command( 'custom', 'Custom_Command', array(
'doc_dir' => __DIR__
) );
```