Conversation
|
I was just thinking about this. We could add a third parametert WP_CLI::add_command(). |
|
What about looking for an appropriately named file in the plugin dir? |
|
Because add_command() doesn't know if the command is defined in a plugin, On Thursday, November 1, 2012, Daniel Bachhuber wrote:
|
|
That makes sense. Although, would it be possible to build the man page from PHPdoc? Having to include a build script to turn .txt into man seems like a pain. Correct me if I'm not understanding things correctly. |
|
Do you know of a PHP library that generates man pages from PHPdoc? |
|
With the current man-dirs branch, it would look something like this: and to generate the man pages, you'd call The only concern is that when generating, it has to look through all the man dirs to find the source. OTOH, if each command would define it's own man dir, it would be tricky to traverse back up from a subcommand to access it. |
|
Cool, looks good. |
I'm working on a wp-cli command for Co-Authors Plus, and would love to package a man file with the plugin. As far as I can tell, wp-cli only supports man files packaged with the project. Is there something I'm missing?