sort actions in alphabetical order in help
This commit is contained in:
parent
52e79537f6
commit
3f81e15309
2
tzk.py
2
tzk.py
@ -208,7 +208,7 @@ class BuildCommand(CliCommand):
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
subparsers = parser.add_subparsers()
|
subparsers = parser.add_subparsers()
|
||||||
for command in CliCommand.__subclasses__():
|
for command in sorted(CliCommand.__subclasses__(), key=lambda i: i.__name__):
|
||||||
subparser = subparsers.add_parser(command.cmd, help=command.help)
|
subparser = subparsers.add_parser(command.cmd, help=command.help)
|
||||||
subparser.set_defaults(_cls=command)
|
subparser.set_defaults(_cls=command)
|
||||||
command.setup_arguments(subparser) # type: ignore
|
command.setup_arguments(subparser) # type: ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user