Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Command help groups [moved] #26

Open
trentm opened this issue Sep 28, 2012 · 3 comments
Open

Command help groups [moved] #26

trentm opened this issue Sep 28, 2012 · 3 comments

Comments

@trentm
Copy link
Owner

trentm commented Sep 28, 2012

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.
@hfeeki
Copy link

hfeeki commented Mar 17, 2013

I need this function. I want to implement it. Do you have any suggestions about how to implement it ?

@hfeeki
Copy link

hfeeki commented Mar 19, 2013

I have code it and upload it .

@trentm
Copy link
Owner Author

trentm commented Mar 20, 2013

Thanks, I will take a look as soon as I can. I'd started reviewing and it looks good so far.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants