test/test.py: support ‘invisible’ subgroups starting with ‘_’
This commit is contained in:
parent
15411c8347
commit
5579f41e19
1 changed files with 3 additions and 2 deletions
|
|
@ -489,8 +489,9 @@ class CmdGroupMgr(object):
|
|||
yellow(name.ljust(13)),
|
||||
(cls.__doc__.strip() if cls.__doc__ else cls.__name__) )
|
||||
if hasattr(cls,'cmd_subgroups'):
|
||||
max_w = max(len(k) for k in cls.cmd_subgroups)
|
||||
for k,v in cls.cmd_subgroups.items():
|
||||
subgroups = {k:v for k,v in cls.cmd_subgroups.items() if not k.startswith('_')}
|
||||
max_w = max(len(k) for k in subgroups)
|
||||
for k,v in subgroups.items():
|
||||
yield ' + {} · {}'.format( cyan(k.ljust(max_w+1)), v[0] )
|
||||
|
||||
from mmgen.ui import do_pager
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue