cog icon indicating copy to clipboard operation
cog copied to clipboard

Support shortdocs for cog commands

Open davejlong opened this issue 8 years ago • 2 comments

When outputting the help page for Cog, it would be useful to see a "shortdoc" for cog commands.

For example, on the Twitter bundle, the output of @cog help twitter is:

> **Commands**
>
> * `tweet` - Tweet from one or more accounts

It would be more user friendly if the format included the basic syntax of the command:

> **Commands**
>
> * `tweet` - Tweet from one or more accounts
>    * `twitter:tweet [--as <as>] <message>`

davejlong avatar Apr 14 '17 02:04 davejlong

We can do this now by including them in the description field in the bundle config.yml, can't we?

It is unclear that's possible without some fussing though.

ohaiwalt avatar Apr 28 '17 03:04 ohaiwalt

Since we already have an examples field we could probably loop through the non-empty lines and add this. Since this is a text field I do worry about existing stuff not being formatted correctly and becoming a mess.

Maybe we make it so the examples field accepts a list as well (at least for now). A text examples field will just throw the whole blob under there (or maybe not show at all), and a list can individually list them out. This would allow us to slowly transition existing stuff.

nmohoric avatar Aug 18 '17 12:08 nmohoric