cmdln
cmdln copied to clipboard
Command help groups [moved]
This is Issue 26 moved from a Google Code project. Added by 2010-05-22T01:44:51.000Z by [email protected]. Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium
Original description
It would be nice if cmdln supported groups for commands, such that the help
for the tool is printed separated by sections.
Somewhat like:
class Tool(cmdln.Cmdln):
@cmdln.section("colors")
def do_red(...):
...
...
@cmdln.section("metasyntactic")
def do_foo(...):
...
@cmdln.section("metasyntactic")
def do_bar(...):
...
...
$ tool help
Usage:
tool ...
Commands:
colors:
red The red color.
green The green color.
blue The blue color.
metasyntactic:
foo Does foo.
bar Does bar.
baz Does baz.
I need this function. I want to implement it. Do you have any suggestions about how to implement it ?
I have code it and upload it .
Thanks, I will take a look as soon as I can. I'd started reviewing and it looks good so far.