Add help to subcommands

This commit is contained in:
Robert Miles 2019-09-25 11:18:00 -04:00
parent 52ca8c447a
commit 9a9555ae7e
1 changed files with 3 additions and 1 deletions

View File

@ -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