Add help to subcommands
This commit is contained in:
parent
52ca8c447a
commit
9a9555ae7e
|
@ -7,8 +7,10 @@ class CommandGroup:
|
|||
def __init__(self,f,default="help"):
|
||||
self.base = f
|
||||
self.subcmds = {}
|
||||
self.subcmds_help = {}
|
||||
self.default = default
|
||||
def command(self,name):
|
||||
def command(self,name,help):
|
||||
self.subcmds_help[name]=help
|
||||
def _register_subcmd(f):
|
||||
self.subcmds[name]=f
|
||||
return f
|
||||
|
|
Reference in New Issue